Community Support for OpenDocMan (Deprecated)

Full Version: Disable uploads to certain department
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good day,
I've just started to use ODM. And so far I like the software, but miss couple thigs, most important one to me is a bility to limit file uploads. Here a hack to remove upload link for everyone exept admin is used. I gues I could go with something simmilar, but I need to allow whole department to upload, and the other department should not have this abilility. The biggest problem with this, I do not know how to format {if $department id '1'} part, what would be the correct call?
The best way to do this (besides putting in a feature request at our uservoice page) is by adding a new configuration option in the odm_settings table, then using that to determine if a department can upload.

Example: Add a new row in the DB with name=nouploaddepts, values=1,5,6 (as an example). Then in the add/edit page you could just check to make sure the current users' department is not in the nouploaddepts array.

Thank you for a fast reply. Altough I would prefer a way without messing with db stuff, but I'll will try your suggestion. Thanks again.
Optimally this could be either a plugin, or a new core feature. If you make any progress on this let me know and I can try to get it integrated.