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