Added capability for organisation administrators to accept/reject join requests, remove members, edit their details and reset their passwords
This commit is contained in:
@@ -167,6 +167,19 @@ class OrganisationPermissions extends BaseSeed
|
||||
'conditions' => 'always()',
|
||||
'description' => 'View a page containing a list of deleted organisations.',
|
||||
]),
|
||||
|
||||
'update_org_user_field' => new Permission([
|
||||
'slug' => 'update_user_field',
|
||||
'name' => 'Edit organisation member',
|
||||
'conditions' => "can_admin_via_orgs(self.id, user.id) && subset(fields,['name','email','locale','password','phone_number'])",
|
||||
'description' => 'Edit users who are in an organisation they are a member of.',
|
||||
]),
|
||||
'view_org_user_field' => new Permission([
|
||||
'slug' => 'view_user_field',
|
||||
'name' => 'View organisation member',
|
||||
'conditions' => "similar_orgs(self.id, user.id) && in(property,['user_name','name','locale','email','phone_number','activities'])",
|
||||
'description' => 'View certain properties of any user in their organisation.',
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -245,6 +258,8 @@ class OrganisationPermissions extends BaseSeed
|
||||
$permissions['leave_organisation']->id,
|
||||
$permissions['register_organisation']->id,
|
||||
$permissions['accept_organisation_join_request']->id,
|
||||
$permissions['update_org_user_field']->id,
|
||||
$permissions['view_org_user_field']->id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user