Basic users cannot list users
MODIFY
src/authorization/AuthorizationsDefinition.ts
src/authorization/AuthorizationsDefinition.ts
@@ -254,18 +254,6 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
},
basic: {
grants: [
- {
- resource: Entity.USERS, action: Action.LIST,
- attributes: [
- 'id', 'name', 'firstName', 'email', 'role', 'status', 'issuer', 'createdOn', 'createdBy',
- 'lastChangedOn', 'lastChangedBy', 'eulaAcceptedOn', 'eulaAcceptedVersion', 'locale',
- 'billingData.customerID', 'billingData.lastChangedOn'
- ],
- condition: {
- Fn: 'custom:dynamicAuthorizationFilters',
- args: { filters: ['OwnUser', 'SiteAdminUsers'] }
- },
- },
{
resource: Entity.USER, action: Action.READ, attributes: [
'id', 'name', 'firstName', 'email', 'role', 'status', 'issuer', 'locale', 'plateID',
@@ -631,6 +619,18 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
'basic': {}
},
grants: [
+ {
+ resource: Entity.USERS, action: Action.LIST,
+ attributes: [
+ 'id', 'name', 'firstName', 'email', 'role', 'status', 'issuer', 'createdOn', 'createdBy',
+ 'lastChangedOn', 'lastChangedBy', 'eulaAcceptedOn', 'eulaAcceptedVersion', 'locale',
+ 'billingData.customerID', 'billingData.lastChangedOn'
+ ],
+ condition: {
+ Fn: 'custom:dynamicAuthorizationFilters',
+ args: { filters: ['OwnUser', 'SiteAdminUsers'] }
+ },
+ },
{
resource: Entity.USER, action: [Action.READ], attributes: [
'id', 'name', 'firstName', 'email', 'role', 'status', 'issuer', 'locale', 'plateID',

Basic users cannot list users