
Deny Access to the Device Copy Function
Determine who can make copies when
Wouldn’t it be great if you had more ability to manage user access to the device copy function? Well, now you do. Managing copy access comes in handy for a lot of situations such as,
- Only allowing copying for certain users or groups on specific devices
- Restrict the number of copies a user can make in a day, week, etc.
- Block color copying for specific user groups, or block it altogether
- Limit the number of copies that can be made during peak usage times
This functionality is possible starting in PaperCut MF 19.2 and is enabled by two APIs in Device Scripting.
actions.login.denyCopyAccess()
actions.login.denyColorCopyAccess()
- FX AIP V+
- HP OXPd
- KM
- Kyocera HyPAS
- Lexmark
- Sharp OSA N2
- Toshiba V3
- Xerox EIP 1.5+
As of PaperCut MF 20.0, these APIs are also supported on,
- Canon 2nd Gen
- Canon 3rd Gen
- Fuji Xerox AIP IV
- Ricoh SmartSDK
- Sharp OSA 3.5
- Toshiba V2
There are other platforms in development, so make sure you test before using these APIs in a live environment.
Some Practical Implementations
Let’s explore a couple of common use cases where denying access to copying is a useful tool. The first case is often requested by commercial organizations, and the second is more prevalent in education.
Use case #1: My organization would like to prevent copying after 6:00pm and on weekends for anyone not in the “Manager” group.
function deviceLoginHook(inputs, actions) { var hour = inputs.job.date.getHours(); var day = inputs.job.date.getDay(); if (hour < 8 || hour >= 18 || day == 0 || day == 6) { if (!inputs.user.isInGroup("Manager")) { actions.login.denyCopyAccess(); } } }
Use case #2: My school’s Art department would like to allow copying on its devices for members of the Art staff only.
function deviceLoginHook(inputs, actions) { if (!inputs.user.isInGroup("art_staff")) { actions.login.denyCopyAccess(); } }
inputs.device.isInGroup(groupName)
API. This would allow one script to accommodate multiple devices and user groups, and then set copy access accordingly.
The User Experience
Once the user logs in at the device they will either have access to the copy function or not, based on the conditions tested in the Device Script. If they are allowed to make copies they should see the copy app.

Otherwise, they will be denied access (this could look different depending on the device manufacturer and model).

Recipes
There are also two Device Script recipes we cooked up to provide working examples of these APIs. The first, “Impose a daily copy limit” demonstrates how to limit the number of copies a user can make in a day. This could easily be altered to limit by week, month or another date range. Second, the recipe “No copy for users in a selected group” is a nice template for restricting copy access by group membership.
Next Steps
If you’d like to try out Device Scripting and discover lots of other scenarios it can solve, take a look at our Device Scripting Help Center.
Still have questions?
Let us know! We love chatting about what’s going on under the hood. Feel free to leave a comment below or visit our Support Portal for further assistance.
Categories: How-to Articles, Scripting and APIs, Devices
Keywords: Scripting, Deny Copy, Zero Stop, mf-only
Comments