Permissions

Hello again!

I have a query about authorities. Is it possible to customise authorities? Currently it seems like an 'all or none' phenomenon. We'd like to grant our staff members some authorities, but not others. Eg: be able to remove an item off an invoice, but not an invoice itself. Or not be able to edit products, but not delete a product.

 

Thanks!

Amanda.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Permissions

You can. To prevent deletion of invoices, you'll need to create a role which lists all of the archetypes which may be deleted, with the exception of invoices.

1. Go to Administration -> Authorities. Click New. Fill out the New Authority as follows:

  • Authority Name: Remove Customer Account Item
  • Service Name: Archetype Service
  • Method Name: remove
  • Archetype Name: act.customerAccount*Item

This creates an Authority which gives permission to remove all archetypes matching act.customerAccount*Item

This matches:

  • act.customerAccountInvoiceItem (i.e. Customer Invoice Item)
  • act.customerAccountCounterItem (i.e. Customer Counter Sale Item)
  • act.customerAccountCreditItem (i.e. Customer Credit Item)

2. Click OK to save the Authority

3. Go to Administration -> Roles. Click New. Fill out the New Role as follows:

  • Name: Simple Remove Role
  • Add the following Authorities
    • "Remove Customer Account Item"
    • "Save. All"
    • "Create. All"

This creates a Role which can create and save all archetypes, but only remove customer account items

4. Click OK to save the Role

5. Assign the Role to a user

Go to Administration -> Users, and edit a user.

Remove any existing role, and add the new "Simple Remove Role"

 

Regards,
 

Tim

 

Re: Permissions

Hi Amanda,

As Tim has indicated authorities can be readily customised and it was always the idea that the project would include quite a few authorities grouped into roles which people could then use to assign to users.  Roles like Clinician, Nurse, Stock Manager, Product manager etc. 

Unfortunately it has been difficult to allocated our time to get these together and there hasn't been much pressure from the users to implement these so it has gone down the priority list.

Creating a definitive list of authorities and roles is quite a large task that requires a good understanding of the archetype system and which ones are used where.  It will also require lots of testing to make sure we don't restrict a common task.

If anyone who understands archetypes wanted to help with developing and testing these it would be greatly appreciated.  I would be happy to advise and chip in some work but unfortunately I cant do it all at this point in time.  

Cheers

Tony

Syndicate content