issue #24104: add comment
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Thu, 17 Jul 2014 14:50:30 +0000 (10:50 -0400)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Thu, 17 Jul 2014 14:50:30 +0000 (10:50 -0400)
node-datasource/lib/ext/models.js

index 2de8625..b9d95c5 100644 (file)
@@ -110,6 +110,13 @@ white:true*/
 
     recordType: 'SYS.User',
 
+    /**
+      Checks for a user privilege. Also checks all the roles that the user is a part of.
+      Necessarily async because not all the relevant data is nested.
+      Not portable to the client because of the backbone-relational-lessness
+      of the models.
+      `callback(err, result)` where result is truthy iff the user has the privilege
+    */
     checkPrivilege: function (privName, database, callback) {
       var privCheck = _.find(this.get("grantedPrivileges"), function (model) {
         return model.privilege === privName;