User Tools

Site Tools


developers:general:permissions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
developers:general:permissions [2014/10/16 13:20]
Jaco van Wyk created
developers:general:permissions [2014/10/18 07:00]
Jaco van Wyk
Line 1: Line 1:
 ====== Permissions ====== ====== Permissions ======
  
 +===== System design =====
 +
 +The SnapBill permission system runs according to a longest prefix match based system on top of the URL structure that we use in SnapBill.
 +
 +By default all new users simply have the / permission enabled which gives them access to everything. If you choose to DENY /client (access to a single client) it will also block off the ability to add a client /​client/​add. A rule such as DENY /; ALLOW /client/add will block the user from doing anything except adding new clients.
 +
 +Whether we allow or deny a given address to one of your users, depends on the action of the longest matching rule that you have defined.
 +
 +Allowing /client/* will allow anything under /client excluding /client itself. See the examples section for use cases of this.
 +
 +===== Url prefix examples =====
 +
 +There are thousands of potential permissions throughout SnapBill so unfortunately we can't list them all here. If you're looking for a single one please feel free to contact support and we'll try help you out.
 +
 +<code php>/​billing:​ Access to the billing area</​code>​
 +<code php>/​clients:​ View simple listings and search all clients on the account</​code>​
 +<code php>/​client:​ View details about a specific client</​code>​
 +<code php>/​client/​*:​ All the "/​client"​ links below, but not including "/​client"​ itself</​code>​
 +<code php>/​client/​add:​ Add a new client to the account</​code>​
 +<code php>/​client/​change_state:​ Change the state of an existing client</​code>​
 +<code php>/​client/​payment_method:​ Change the payment method of an existing client</​code>​
 +<code php>/​client/​remove:​ Remove a client from the account</​code>​
 +<code php>/​client/​update:​ Update general details of a client</​code>​
 +<code php>/​editor:​ Access to the invoice editor</​code>​
 +<code php>/​email/​add:​ Add (send) a new email to a client</​code>​
 +<code php>/​email:​ View an email that has been sent previously</​code>​
 +<code php>/​import/​add:​ Upload a new import to SnapBill</​code>​
 +<code php>/​imports:​ Access to the imports area</​code>​
 +<code php>/​import:​ Access to a single import</​code>​
 +<code php>/​report/​clients:​ Access to a specific report (the '​Clients'​ report)</​code>​
 +<code php>/​report:​ Access to the reporting section</​code>​
 +<code php>/​setup:​ Access to the setup area</​code>​
 +<code php>/​statistics/​growth:​ Access to a specific statistics page</​code>​
 +<code php>/​statistics:​ Access to the statistics area</​code>​
 +
 +===== Example permission setups =====
 +
 +Allow access to search and view clients, but not to do anything else with them
 +
 +<code php>​DENY ​ /
 +ALLOW /clients
 +ALLOW /client
 +DENY  /​client/​*</​code>​
 +
 +Allow access to the system as usual, but don't allow anything in the setup or statistics area
 +
 +<code php>​ALLOW /
 +DENY  /setup
 +DENY  /​statistics</​code>​
 +
 +Allow only access to the '​Stacked Income'​ statistics report
 +
 +<code php>DENY /
 +ALLOW  /statistics
 +DENY  /​statistics/​*
 +ALLOW  /​statistics/​stacked_income</​code>​
developers/general/permissions.txt ยท Last modified: 2014/10/18 07:04 by Jaco van Wyk