Announcement

Collapse
No announcement yet.

Creating and editing user without giving administration access

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Hi tanya , is this thread live, I did changes, but on user create form there is no flieds for username password. I changed client/src/views/user/record/details.js and client/src/views/user/record/edit.html, but there is some issue with password

    Comment


    • #17
      I make following changes in my extension:

      Resources/metadata/app/acl.json
      Code:
      {
      "mandatory": {
      "scopeFieldLevel": {
      "User": {
        "dashboardTemplate": false,
        "password": true,
        "passwordConfirm": true,
        "auth2FA": false,
        "authMethod": false,
        "apiKey": false,
       "secretKey": false,
      "token": false
      } } } }
      Resources/metadata/entityAcl/User.json
      Code:
      {
        "fields": { 
          "password": { "internal": true, "nonAdminReadOnly": false },
          "passwordConfirm": { "internal": true, "nonAdminReadOnly": false}
        }
      }

      Extend views/user/record/detail and views/user/record/edit

      Replace this.getUser().isAdmin() with this.getAcl().checkScope('User', 'create') in setup method for the passwordfield

      Comment

      Working...
      X