Skip to content

dioscouri/nodejs-admin

Repository files navigation

nodejs-admin application

Build Status

ACL Setup

  1. Describe your application resources and actions using acl_resources model inside main application. See example

  2. Register acl_resources model in Registry. See example

  3. Create 2 extra fields in controller:

    • _aclResourceName - A String, describes current resource name. See example
    • _protected - An Array of Strings, describes protected routes. See example
  4. Login into Admin UI, create and configure your roles (/admin/acl_roles) and permissions (/admin/acl_permissions)

  5. Assign created roles to users using a Permissions tab in a user edit UI

List Export Setup

  1. Configure Export fields and aliases (future column names) in your CRUD Controller:

    this._xlsExportFields = [{field: '_id', column: 'ID'}, {field: 'name', column: 'Doctor Name'}];
    
  2. Use exportActionUrl in views to export

Audit logging

How to upgrade to new logging:

  1. Update base model in your project, add resourceModel to traceModelChange calls, see example.
  2. Optionally. Add array of fields to audit ignore to your models, it should be called as auditIgnoredFields, see example.