Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  options CPD depending on record field contents

phpMyEdit Configuration     options CPD depending on record field contents
Odoslať novú tému   Odpovedať na tému    
 
lemmi     Založený: 23.06.2004   Príspevky: 9  
Príspevok Zaslal: 2004-06-23 17:34
Návrat hore  Odpovedať s citátom     

Hi,
first I must congratulate the developers/maintainers of the PME class, it's a high valuable s/w and every day I discover new features by setting appropriate parameters. Just one question (maybe it's already answered somewhere in the documentation):
Is't possible to control the user rights (i.e. options ACPV) on record level? What I'm going to try is to implement a feature to restrict change/copy/delete to the owner of a record. For identification I have already added a field User-ID to the tables which contains the unique numbers of the individual users.

Has somebody an idea how this could be implemented?
p.s. I use the latest CVS version of PME

 
lemmi     Založený: 23.06.2004   Príspevky: 9  
Príspevok Zaslal: 2004-06-24 17:44
Návrat hore  Odpovedať s citátom     

doug,

I know that permission option, but this will filter the data for all pages. Or have I missed something? So far I have understood the logic in PME 'options variability' is possible for field options only, thus it wouldn't work here.
What I would like to do is to switch on/off the change/copy/delete buttons (graphic links) in the list page depending on the user_id, which is one field in the record. I already have implemented an authentication system so that the user_id of the user logged-in is known and I can set individually the initial options by using some code in the calling script.
The user should now have the permission to view all records, but the permission to manipulate the owned records only.
I have looked through the code of the class. In the list_table function the permissions will be checked for each record, e.g. change_enabled() looks for the 'C' in the options string. But how can I set the options dynamically for each record individually?
Ok, I can modify the class, but I'm not an 'insider' of PME and the risk is too high to get dangerous side effects.
Maybe there is a more elegant solution already inherent in PME?

Thanks a lot for your proposal.

 
lemmi     Založený: 23.06.2004   Príspevky: 9  
Príspevok Zaslal: 2004-06-25 12:39
Návrat hore  Odpovedať s citátom     

Yes, that will work. I use a similar approach already for initial settings in combination with table locking.

Maybe another option for the dynamic permission setting could be (is just an idea, no proof up to now) self generated graphic or text links using virtual fields and the sql feature. Then I have to do only some minor modification in the list_table function to switch of the display of the original links.

Because permission on record level is such a basic feature in a multi-user environment, one should think about the best solution for the implementation.

Further proposals are appreciated. Tanks a lot.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov