Re-apply initial user settings via server command
There are situations in complex environments where users that move department, course or position, need to have their group membership changed. These changes under normal conditions do not evoke a reset of the user’s current rules or balances, requiring manual intervention on the administrators’ part.
Many of our Administrators have scripts to move a user across multiple systems and set their new permissions/conditions. Papercut is no exception to that rule.
This server command was created to allow administrators the flexibility to return a user’s properties to the same initial state as a newly created user via command line. Usage:-
Re-applies initial settings to the user based, on group membership. <username> - the user’s PaperCut username.
To that end the Re-apply initial settings command was designed to give the admin the ability to script the same action as:
- Clicking the “Re-apply initial settings’ link in the
Actionssection of the User Details page. (Users → [Name of the user])
- Apply any group rules and settings the admins have set in the “New user settings “ section of the group details page. (Groups → [Name of the group)
- Re-Apply Initial Settings (advanced) from the
Bulk User Actions→Reset statisticssection.
When used in conjunction with the following commands
remove-user-from-group <username> <group-name>
add-user-to-group <username> <group-name>
It forms part of any complex user maintenance script to ease the workload of administrators.
For more information on using server commands, how to execute them see Appendix A of the PaperCut manual
For example: If you want to remove user “guest-user” from “Internal Users” group, then you can run the above command like this:
remove-user-from-group guest-user “[Internal Users]”