text: 'use strict';
  
  const parent = require('evado/config/default-security');
  
  module.exports = {
  
      metaPermissions: [{
          description: 'Full access to data',
          roles: 'administrator',
          type: 'allow',
          actions: 'all',
          targets: {type: 'all'}
      }],
  
      permissions: {
          ...parent.permissions,
  
          'moduleAdmin': {
              label: 'Admin module'
          },
          'moduleOffice': {
              label: 'Office module'
          },
          'moduleStudio': {
              label: 'Studio module'
          },
          'moduleApiBaseUpload': {
              label: 'Upload files'
          }
      },
  
      roles: {
          'administrator': {
              label: 'Administrator',
              description: 'Full access to all',
              children: [
                  'moduleAdmin',
                  'moduleOffice',
                  'moduleStudio',
                  'moduleApiBaseUpload'
              ]
          },
          'guest': {
              label: 'Guest',
              description: 'Auto-assigned role for unauthenticated users'
          },
          'user': {
              label: 'User',
              description: 'Default role for authenticated users',
              children: [
                  'moduleOffice',
                  'moduleApiBaseUpload'
              ]
          }
      },
  
      rules: {
          'creator': {
              label: 'Creator',
              description: 'Check user binding as object creator',
              config: {
                  Class: 'evado/component/meta/rbac/rule/UserRule',
                  attr: '_creator'
              }
          }
      },
  
      // bind users to roles
      assignments: {
          'Adam': 'administrator'
      },
  
      // rules to bind users to roles
      assignmentRules: {        
      }
  };