yellowcake Posted September 12, 2007 Posted September 12, 2007 I have a file that requires 3 levels of access. Manager (see everything) State manager (See only records that are in their state) User (see only record that belong to that user) Using "define accoutn and privs" I've managed to get Manager and user to work with "custom record privileges". Setting it to limited and using AccountName = Get ( AccountName ) to set the user level and show only record that belong to that account name. Manager has view everything so that was no problem This was working fine until they requested State managers will need to see all records that belong to their state.. My thinking on this was along these line... If ( Get ( AccountName ) ; Users profiles::State ; 1 ) The thinking behnd this is if the account name (ie VIC) matches the State (IE VIC) then show record, if not then don't. This isnt working.. am i heading in the right direction, or is there a better way? Hope this makes sense. Cheers Al
Genx Posted September 12, 2007 Posted September 12, 2007 If( Get(AccountName) = AccountName and Table::State = globalTable::userState ; 1 ) Essentially, add a globals table, for your startup script, go to the users profiles table, find the user's account record, and set a global field calld userState to the value of that user's state. Then you have constant access to it. If you don't know how to add a global field, simply create a text field, go to storage options and click use global storage.
yellowcake Posted September 12, 2007 Author Posted September 12, 2007 Hi Genx... Thanks for that, I'll give that a go, and see what happens. Just a thought... If there is a global State in there, wouldnt that mean we couldnt have other states (ie NSW, ACT and so on) i think im missing your point sorry. Cheers Al
Genx Posted September 12, 2007 Posted September 12, 2007 Huh? No, the point of the global state field is specifically to temporarily store the value of the person that is logged in. So if you had 10 people logged in, the global would be storing a different state for each person (whatever state they are responsible for supervising). Myeh, take a look at this, and see if it helps: http://faq.filemakermagazine.com/index.php/Global_fields
yellowcake Posted September 13, 2007 Author Posted September 13, 2007 Sorry Genx.. im completly missing what your saying.. im sure that its very simple once you get it... Could you explain again, in complete dummies terms or do you know of an example that i could pull apart and have a look at? Just to set the scene, im a Graphic Designer that fell into FMP, rather than a programmer. IE im a dummy left brainer, not a logical right brainer :
Genx Posted September 13, 2007 Posted September 13, 2007 I'm a... No Brainer, but i think you may have your hemisphere's backwards lol : There are 4 accounts: User, Pass: NSW, NSW VIC, VIC QLD, QLD Admin, Note that the actual account names have nothing to do with the way this works - they have just been named as the states to make the demo easier. HTH multiLevelSecurity.zip
Recommended Posts
This topic is 6279 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now