0.0.40 • Published 6 years ago

xceling-role v0.0.40

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

The xceling-* suite is a work new to nodejs, and as such should not be relied on. I am actively working on this, however, and hope to see a useful version available before spring of '17.

This code is based on PHP based CMS I developed and is currently in production use on a good number (the only number I can give is more then 30) websites. These websites include the small personal and some large commercial ones.

If you are interested in helping move this nodejs project forward or would like to see the PHP version contact me at rama@ramabahama.net

EXCELING-TASK NOTES:

This module contains the code for handling an exceling task. A task defines a permission on the user side that is required to access a given functionality. The set of user permissions is retrieved by accessing the user instance.Permissions instance getter. The task/pemission is defined by task instance.Name.

let Task = require('xceling-task')({store: 'mongo'}), tk; Task.getSingleObject({Name: 'User Editor', Flags: Task.FLAG_ACTIVE}, function(err, task) { if(!err) tk = task; else util.log(err); }); -- or -- tk = new (require('xceling-task'))({see Task definition for options});

PUBLIC CLASS METHODS

Task.getAllTaskDataArray(args, fn)

  • Retrieves an array of objects representing the database entries for all task entries matching the input arguments (args).
  • See Task definition for details regarding args and fn.

Task.getSingleObject(args, fn)

  • Retrieves a single Task instance using the input arguments (args) to search the database.
  • See Task definition for details regarding args and fn.

PUBLIC CLASS GETTERS AND SETTERS

Task.FLAG_ACTIVE (getter only)

  • Retrieves the appropriate value for the active flag

Task.Flags (getter only)

  • Retrieves an array of objects representing all the flags publicly available in Task.
  • See Task definition for details of the objects returned.

PUBLIC INSTANCE METHODS (tk = new Task())

tc.delete(fn)

  • Removes this task from the system.
  • See Task definition for details regarding fn.

tc.save(fn)

  • Saves this task's information to the database.
  • See Task definition for details regarding fn.

PUBLIC INSTANCE GETTERS AND SETTERS (tc = new Task())

tc.Properties (getter only)

  • Retrieves a properties object for this instance. This properties object is a copy of, not a reference to, the instance properties object so no changes to this instance's properties can be made with this call.
  • See Task definition for details regarding instance properties.

tc.SanatizedProperties (getter only)

  • Retrieves a 'sanatized' properties object for this instance. A sanatized properties object removes senstive information prior to returning. This sanatized properties object is a copy of, not a reference to, the instance properties object so no changes to this instance's properties can be made with this call.
  • See Task definition for details regarding instance properties and the sanatizing process.

tc.ID (getter only)

  • Retrieves an internal unique ID assigned to this instance. This may, for instance, be a database entry Id.

tc.Name (getter and setter)

  • Retrieves or sets the name for this instance.
  • See Task definition for details regarding instance name.

tc.Description (getter and setter)

  • Retrieves or sets the description for this instance.
  • See Task definition for details regarding instance description.

tc.Flags (getter and setter)

  • Retrieves or sets the flags for this instance.
  • See Task definition for details regarding instance flags.
0.0.40

6 years ago

0.0.37

7 years ago

0.0.36

7 years ago

0.0.35

7 years ago

0.0.30

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago