Lock lists and forms to certain users

madpato

Member
Hello

I need to do some sort of "lock" to some lists and forms so certain users are no longer able to add data, after certain period (like the end of each month for example) I know i can just unpublish a form or a field but i would like some sort of message when they try to enter data, for example "the end of the month was reached, if you need to enter data please contact an administrator".
Is there a way to achieve this?

Thanks.
 
In general you would want to install the 'caneditrow' list plugin (http://fabrikar.com/forums/index.php?wiki/can-edit-row-list-plugin/) I think you would need to use the PHP (eval) option though your logic sounds a bit more complex than just 'if x = y then dont allow edit', I can help you with that but I'd need more specific information to be able to supply sample code:

For the "certain users" part - are these users always the same users? If so create a user group and access level for those users. If not how are you defining which users should be blocked

How would you define 'end of the month' is it say 'any day after the 23rd of the month'?

-Rob
 
Hello Rob

I havent replied since i am doing more thinking about these questions, but what can i do tell you about the users group they will be fixed and certain users will belong to those groups with predefined set of rules.

For the end of the month part, this will be performed for an administrator of the system so he/she will (ideally) just press a button (at any given day or time) and the lock of the month should take place making the other users who enter the data unable to do it (and if they require to do it, they will need permission from the administrator).
I hope this makes things clearer. Thank you.
 
Thanks for the reply.
For the 'administrator locking the records' I would suggest using the update_col list plugin, this will allow the admin to select multiple records to 'lock' (e.g. set a field 'tablename__locked' to a value of '1')

Then your canedit row plugin would be fairly simple to set up, I've made a very quick demo here http://demo.fabrikar.com/index.php/can-edit-row
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top