Disable uploads to certain department - Printable Version +- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com) +-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html) +--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html) +--- Thread: Disable uploads to certain department (/thread-520.html) |
Disable uploads to certain department - meisteris - 05-22-2012 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? Re: Disable uploads to certain department - Stephen - 05-22-2012 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. Steve http://opendocman.uservoice.com/ Re: Disable uploads to certain department - meisteris - 05-22-2012 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. Re: Disable uploads to certain department - Stephen - 05-22-2012 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. |