JSDoc cleanup
This commit is contained in:
parent
1316676946
commit
1694ee2d83
|
@ -61,6 +61,7 @@ var ACLSchema = {
|
|||
|
||||
/**
|
||||
* Name of the access type - READ/WRITE/EXEC
|
||||
* @property accessType {String} Name of the access type - READ/WRITE/EXEC
|
||||
*/
|
||||
accessType: String,
|
||||
|
||||
|
@ -114,7 +115,7 @@ ACL.SCOPE = Principal.SCOPE;
|
|||
* Calculate the matching score for the given rule and request
|
||||
* @param {ACL} rule The ACL entry
|
||||
* @param {AccessRequest} req The request
|
||||
* @returns {number}
|
||||
* @returns {Number}
|
||||
*/
|
||||
ACL.getMatchingScore = function getMatchingScore(rule, req) {
|
||||
var props = ['model', 'property', 'accessType'];
|
||||
|
@ -296,14 +297,12 @@ ACL.getStaticACLs = function getStaticACLs(model, property) {
|
|||
|
||||
/**
|
||||
* Check if the given principal is allowed to access the model/property
|
||||
* @param {String} principalType The principal type
|
||||
* @param {String} principalId The principal id
|
||||
* @param {String} model The model name
|
||||
* @param {String} property The property/method/relation name
|
||||
* @param {String} accessType The access type
|
||||
* @param {Function} callback The callback function
|
||||
*
|
||||
* @callback callback
|
||||
* @param {String} principalType The principal type.
|
||||
* @param {String} principalId The principal ID.
|
||||
* @param {String} model The model name.
|
||||
* @param {String} property The property/method/relation name.
|
||||
* @param {String} accessType The access type.
|
||||
* @callback {Function} callback Callback function.
|
||||
* @param {String|Error} err The error object
|
||||
* @param {AccessRequest} result The access permission
|
||||
*/
|
||||
|
@ -364,14 +363,14 @@ ACL.prototype.debug = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if the request has the permission to access
|
||||
* @param {Object} context
|
||||
* @property {Object[]} principals An array of principals
|
||||
* @property {String|Model} model The model name or model class
|
||||
* @property {*} id The model instance id
|
||||
* @property {String} property The property/method/relation name
|
||||
* @property {String} accessType The access type
|
||||
* @param {Function} callback
|
||||
* Check if the request has the permission to access.
|
||||
* @options {Object} context See below.
|
||||
* @property {Object[]} principals An array of principals.
|
||||
* @property {String|Model} model The model name or model class.
|
||||
* @property {*} id The model instance ID.
|
||||
* @property {String} property The property/method/relation name.
|
||||
* @property {String} accessType The access type: READE, WRITE, or EXEC.
|
||||
* @param {Function} callback Callback function
|
||||
*/
|
||||
|
||||
ACL.checkAccessForContext = function (context, callback) {
|
||||
|
@ -452,8 +451,7 @@ ACL.checkAccessForContext = function (context, callback) {
|
|||
* @param {String} model The model name
|
||||
* @param {*} modelId The model id
|
||||
* @param {String} method The method name
|
||||
* @end
|
||||
* @callback {Function} callback
|
||||
* @callback {Function} callback Callback function
|
||||
* @param {String|Error} err The error object
|
||||
* @param {Boolean} allowed is the request allowed
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue