So I have a database that has different modules, property, admin, user etc
The admin is required to add a user to a role and also remove them against each module.
As an example for property access. All users, are as per normal held in the Accounts table and then the permissions are held in ‘property permission’ table.
On the module screen a list of users are listed from the Accounts table there is a (a) column where user role contains ‘property permission’ and another (b) column where the user roles does not contain ‘property permission’.
Column (a) action is to remove the permission as they already have it
Column (b) action is to add the permission as they do not have it
Column (b) works find - adding a new row for the relevant user into the ‘property permission’
Column (a) does not delete the relevant row from the ‘property permission’
Sorry for the long text and hope someone can help!