View and Edit permissions for fields

A place for users and developers of the Xataface to discuss and receive support.

View and Edit permissions for fields

Postby hhkilis » Wed Mar 21, 2012 8:10 am

Hi,

Users without necessary permissions can also edit fields which are handled under specific permissions. How can I solve this problem?

permissions.ini

Code: Select all
[Field Viewer]
view=1

[Field Editor]
edit=1


Users who have Field Editor role can edit fieldX, users who have Field Viewer role can view fieldX. Here Field Viewers can also change value of fieldX (a select widget is used for fieldX).

I wrote necessary permission function for fieldX in its table's delegate class and checked that function, no problem there.
hhkilis
 
Posts: 15
Joined: Mon Feb 27, 2012 5:49 am

Re: View and Edit permissions for fields

Postby shannah » Wed Mar 21, 2012 10:39 am

Field permissions are overlaid over record permissions. They don't override them as a set. I.e. If you return a role's permissions in a field and it doesn't explicitly specify certain permissions, then the omitted permissions will be just what the record returned for those permissions. I have attached a section from the unfinished Xataface manual that discusses this further and provides an example.
Attachments
xataface-manual-pp52-53.pdf
(118.76 KiB) Downloaded 363 times
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: View and Edit permissions for fields

Postby hhkilis » Thu Mar 22, 2012 12:40 am

Thanks for explanations and attached document. It helped a lot.

I tried the solution below, now it works.

permissions.ini

Code: Select all
[Field Viewer]
view=1
edit=0
new=0

[Field Editor extends Field Viewer]
new=1
edit=1
Last edited by hhkilis on Fri Mar 30, 2012 5:17 am, edited 1 time in total.
hhkilis
 
Posts: 15
Joined: Mon Feb 27, 2012 5:49 am

Re: View and Edit permissions for fields

Postby hhkilis » Thu Mar 22, 2012 1:22 am

hhkilis
 
Posts: 15
Joined: Mon Feb 27, 2012 5:49 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 25 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved