|
|
|
|
|
|
|
|
|
|
|
|
|
|
Managing database ACLs from a browser (continued)
document.location.search = "Open&name="+(this.value)
|
This code causes the browser to reload the page and change the query string of the URL (everything after the "?") to include the name of the selected user. Remember how the "name" field got its value from the @URLQueryString command? Well the previous JavaScript is what creates that query parameter.
Next create a "Save Changes" and "Delete User" button. These buttons should call the agents "SaveACLChanges" and "DelACLUsr" respectively. The formula should be in the same format as the "Set" button.
Create a checkbox field named "usrprops" to display the individual ACL properties the users have, such as the ability to create or delete documents. The choices for this field should be the following text list:
Create Docs | CRD
Delete Docs | DLD
Read Public Docs | RPD
Write Public Docs | WPD
Copy Docs | CD
|
Now we need a field to hold the user type such as server, person group, etc. Create a dropdown list field named "usrType" and give it the following choices (the first line is just a vertical bar which means an empty value):
|
Unspecified | 0
Person | 1
Server | 2
Mixed Group | 3
Person Group | 4
Server Group | 5
|
Beside the usrType field, add a field named "usrLevel", which will display whether the currently selected user is an Author, Manager, etc. The choices for this field should be identical to the choices for mxInet, except you should add a vertical bar alone as the top entry, as we did for the usrType field.
A checkbox field named "usrRoles" will display database roles, and the choices for this field should be a formula simply referencing the field dbroles. Next to this field add an editable text field named "newRole" and buttons named "Add Role" and "Del Role" that call the agents "AddACLRole" and "DelACLRole" respectively. At the bottom of the form create an editable text field named "newUser" and a button titled "Add User" that calls the agent "AddACLUsr".
Before saving and closing this form we need to add two elements. First add the following line to the HTML Head attribute:
{<meta http-equiv="pragma" content="no-cache"></meta>}
|
This will prevent the browser from caching this page and appearing to provide you with stale information. Most importantly, you must add the Domino agent "GetACL" to the WebQueryOpen element. This agent will run every time the form is opened and populate all the fields with data.
Creating the agents Now that all the display work is out of the way we can concentrate on the code that makes the form work. First create a new agent called "GetACL". Like all the agents in this example, it should be set to trigger on an event. It should have the "Action Menu selection" option set, and the target should be "none". In the security tab, all the agents should be set to "Run as Web user". The code for this agent is:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- Advertisement --
Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino
- Don't spend unproductive time maintaining different versions of the same spreadsheet
- Preserve data integrity and security in multi-user environments
- Create reports in minutes INSIDE Notes
- Get freedom from iterative report requests, deliver self-serve capabilities
Experience Reporting, Dashboards, and Analysis INSIDE Notes.
Try IntelliPRINT NOW! |
|
|
|
|
|
|
|
|
|
|