PDA

View Full Version : Edit, Add and Delete Permissions


emerson
19-04-05, 09:17 AM
I want to allow to be able to add records but not delete or edit. Deny delete works fine. However, when I deny edit it takes away the ability to Add automatically. How can I prevent this?

pedroa
19-04-05, 10:40 AM
The way it was done this is sometimes not possible without changing the code.
Why?
Because in some files (specially the addedit.php ones) add and edit are treated just the same.
Usually who has edit rights has adding rights.
I guess this ver 2 still has a round trip to make, and it is good that this permissions discussion is heavily debated.
We should all get more info on how Gacl (that's the permissions manager in dP) handles the permissions.
On the dP side is kinda easy though, specially after the tremendous effort done by Adam to integrate that system in dP.
Let me tell you, fantastic piece of work there for Adam.
Gacl is amazingly imbued within dP. And allready is delivering item level permission control.
I believe that with an (huge) extra effort it would be possible to reach to a field level control, probably with a template engine and a lot of core rewriting (that's exactly what a developer would not want to do)

Has to your question, let me tell you is possible, you will need to identify the files where this behavior appears, find a way to separate add from edit, then identify the lines where the permissions are verified, recode depending on the gacl definitions and that should do it.

Pedro A.