Everyone who signs in to PharmaERP belongs to one role, for example Sales Executive or Warehouse. The role decides which menu items a person sees, which pages open for them, whether they may add, change or delete records there, and a set of finer Yes/No rules. The Role Master screen is the one place where you write this down. It is used by system administrators who manage access, and by the managers who ask for access changes.
Before you start
You need these ticks for the Role page in the SYSTEM section:
To do this | You need |
|---|---|
Open List Roles | IsView |
Open Add New Role and use Copy | IsView and IsCreate |
Open Edit and save changes to a role | IsUpdate |
Delete a role | IsDelete |
The Options menu shows Edit and Delete to everyone who can open the list. Without the matching tick, the AccessDenied page opens.
To find the screen:
Sign in to PharmaERP.
In the left menu open System Settings.
Under Roles & Access choose List Roles or Add New Role.
To copy a role, the role you copy from must already exist. Giving a role to a person is done on the Members page, not here.
The screen at a glance
List Roles shows one row per role. Above the grid you find ROLE LIST | Total, the Add New Role button, the Legend : Active User, the records per page box and Search. Below the grid are Prev, the page numbers and Next.
List Roles with the search box, role grid and Options menu
Add New Role and Edit Role look the same. At the top you set the name and use Role Preview and Save. Below are the section cards, from 1 SYSTEM to 10 REGULATORY. Each opens to show its page cards.
Add New Role with every section closed
Step by step
Find a role and see who holds it
Do this before changing access. A change to a role reaches every member who holds it.
Open List Roles.
Type part of the role name, or a member's name, in Search. The list and the Total badge update as you type.
Read Role Assigned User. Each badge is one member. Green is an active member, grey is an inactive member.
Click a column heading to sort. By default the list is sorted by Modified On, newest first.
Searching changes nothing.
Add a role by copying an existing one
Use this when no role fits but an existing role is close. It saves ticking many boxes by hand.
Open Add New Role.
In Copy from existing role (optional) choose the role to copy, for example Sales Executive. The members who hold it are listed under the box.
Click Copy. Every tick on the page is cleared, then set exactly as in the chosen role. A green message tells you how many rows were copied.
Type the new name in Enter Role name.
Open the sections you want to change and adjust the ticks.
Click Role Preview to check the result, then click Close.
Click Save.
After Copy: the confirmation message and the new name typed
Nothing is saved until you click Save. Copy only changes the screen.
Add a role from scratch
Open Add New Role and leave Copy from existing role (optional) empty.
Type the role name in Enter Role name.
Open each section and tick what the role needs. Everything starts as unticked or No.
Check with Role Preview, then click Save.
Give rights to a role
Each page card has four ticks:
IsView: may open the page and see its menu link.
IsCreate: may add records.
IsUpdate: may change records.
IsDelete: may delete records.
A few pages use the ticks in their own way. Read the note under the page name.
Under a page you may see Yes/No rules, each with a short explanation. Choose Yes to give the rule or No to withhold it. A rule with neither chosen counts as No.
A page card with its four ticks and its Yes/No rules
Some rules are shown together in a framed box with a chain icon and a title. The first rule in the box is the lead.
Set the lead rule to Yes.
Set the rules under it as needed.
While the lead rule is No, the rules under it are set to No, greyed out and locked. The note says "Set <lead rule> to Yes first." If any of them was Yes, a blue message lists the ones that were switched off. When you set the lead back to Yes, they unlock but stay No until you choose Yes.
In the Customer orders under a product box, only one of Other_Customers_All_By_Name, Other_Customers_By_Code and Other_Customers_Locked can be Yes. Choosing one switches the others to No.
Some rules belong to a whole section and not to one page. They are listed together in a card called Rules without a page.
Check a role with Role Preview
Click Role Preview at any time. A floating button also appears at the bottom right when you scroll down.
Read the list of pages with at least one tick and the rules set to Yes. The top shows counts such as pages with grants and functionalities granted.
Click Close to go back.
Role Preview with pages and the rules set to Yes
Change a role
Open List Roles.
Open the Options menu of the role and choose Edit.
Change the name in Role name if needed.
Open the sections and change the ticks.
Check with Role Preview, then click Save.
The Options menu of a role row with Edit and Delete
You return to the list with the message "Role <name> updated successfully !". If you type a name another role already uses, the old name is kept but the ticks are still saved. A change in capital letters only is ignored.
Delete a role
Delete a role only when nobody holds it any more. Check that Role Assigned User is empty first.
In List Roles open the Options menu of the role and choose Delete.
Answer the question "Are you sure to delete this Role?" with OK, or Cancel to stop.
The message "Role deleted successfully !" appears and the role leaves the list. You cannot undo this from the screen.
Warning: Never delete a role that still has members. Never delete or rename SuperAdmin.
Fields explained
Field | What to enter or what it means |
|---|---|
Search | Finds roles by part of the role name, a member's name or the Modified By name. Capitals do not matter. |
records per page | Choose 10, 20, 50 or 100 rows. The list opens with 50. |
Role Name | The name of the role. You can sort by it. |
Role Assigned User | The members who hold the role. Green is active, grey is inactive. |
Modified By | Who last saved the role. |
Modified On | When the role was last saved, as dd-MMM-yyyy hh:mm. |
Copy from existing role (optional) | A role to start from. Only active roles are offered. Add New Role only. |
Enter Role name / Role name | Required. Spaces at the start and end are removed. It must not match another role's name in any capitals. Use at most 200 characters. |
IsView, IsCreate, IsUpdate, IsDelete | The four page ticks. |
Yes / No (rule) | Gives or withholds one finer right. No if neither is chosen. |
Rules without a page | Section-wide Yes/No rules, for example Show_System_ID. |
What happens after you save
The role name is trimmed and checked against all other role names.
On Add, the role is created and active. On Edit, the name and the last-modified person and time are updated.
Every tick shown on the page is stored, including the ones you did not change.
You return to List Roles with a green success message.
Members get the new access the next time they sign in. Until then they keep what they had, including a right you just removed. Ask them to sign out and sign in again.
See All Suppliers And Customers, where it exists, reaches members within about one minute without signing in again.
No number is generated, no e-mail or notification is sent, and no history entry is written.
Messages you may see
Message | What it means | What to do |
|---|---|---|
Role name is required. | You clicked Save with an empty name. | Type a name and save again. |
The Role is already exist !!! Please enter other Role | The name is already used on Add. | Choose another name and set the ticks again, because they were cleared. |
Role name <new> already exists. Previous role name <old> has been retained. | You renamed a role to a name another role has. | The ticks were saved. Choose another name if needed. |
Success! Role <name> created successfully ! | The new role is saved. | Give the role to members. They sign in again. |
Role <name> updated successfully ! | The change is saved. | Ask the members to sign out and in. |
Role not found. | Someone deleted the role while you edited it. | Go back to the list. |
Role deleted successfully ! | The role is deleted. | None. |
This role is already asign to some user, so you can not delete this role | The role still has members. | Move the members to another role first. |
Please select a role to copy from. | You clicked Copy with no role chosen. | Choose a role in the box. |
Copied n granted row(s) from "<role>". Review with Role Preview, then enter a new role name and Save. | Copy worked. | Review and save. |
Unable to copy the selected role. Please try again. | Copy failed, for example you were signed out. | Sign in again and retry. |
Set to No: <rule names> | You set a lead rule to No while rules under it were Yes. | Nothing, unless you want them kept. Then set the lead back to Yes and choose them again. |
Are you sure to delete this Role? | You chose Delete. | Click OK to delete or Cancel to stop. |
AccessDenied | You do not have the tick needed. | Ask an administrator for it. |
Good to know
Changes reach people only at their next sign-in. After saving, ask the members to sign out and in.
A role change affects every member of the role. To change one person only, copy the role into a new role and give it to that person.
A duplicate name on Add clears every tick. Check the name before you spend time ticking.
Four Stock On Hand rules (AmendStock, ApproveStockMovement, BlockNegativeStock, ShowCustomerSupplierStockMovement) are not shown here. You cannot give or remove them on this screen.
The page keeps no change history, only the last person and time. Keep your own record of who asked for an access change and when.
If two administrators edit the same role, the last Save wins for every tick on the page.