Jump to content
Sign in to follow this  
Crazy Bob

Restricting browsable records based on user and group membership

Recommended Posts

Hi guys,

hope someone here is able to offer some advice (and I posted this in the right forum).

Basically I have created a PO system that everyone at my company has thought 'ooo that's nice can we use it' it isn't anything special or earth shattering really.

However I am aware that in order for me to be able to roll this out to multiple users I need to be able to restrict the records being viewed based upon the user accessing the DB and the group they belong to.

So my question is this. Is there any way in FM 8.5 I can restrict the found records (and keep them restricted) that the currently logged in user can browse based upon their group or username. When a new PO is created I'm recording the user ID of the creator (their FM login) so I wouldn't have thought this to have been too difficult, however after some initial digging around I can't find any way to reference the current logged in user, let alone compare that against the users and groups defined within the DB (not as a separate table, but FM users and groups).

Hope that makes some semblance of sense and any help/advice would be greatly appreciated.

CB.

Share this post


Link to post
Share on other sites

Get(AccountName) will tell you who the current user is. You can define which records users of a certain privilege set will have access to in a specific way using the calculation dialog. If you want specific users to have access to a record, then there will have to be a field, or related record that outlines who can access it. Then the calculation dialog in the accounts and privileges section will evaluate true or false for each specific record.

Share this post


Link to post
Share on other sites

Thanks very much for the response Reed, I'll see what dama.... eeerr progress I can make with that info ;)

CB

Share this post


Link to post
Share on other sites

I am have a similar situation. I am setting up a simple employee leave database using FM 8.5 Advanced. I wish I was advanced in using it but am not. I have a page that shows each user how many days they have used for each type of leave (Vacation, Emergency, Sick, etc.). There is also a page for them to submit electronically for days off. I am wanting to restrict access to each user so that they can only view their individual summary page and the request pages they have filled out. I do not fully understand how to do what you have posted here and wonder if you could post and example.

Share this post


Link to post
Share on other sites

Hi there, im doing a similar thing... this seems to be working for me.

Set up a privilege set and then set the record to custom privileges.

under the various bits you can set the level with this calculation...

If ( Get ( AccountName ) ≠ ( First Name ) ; 0 ; 1 )

in my case im calling the AccountName. If the accountname is not equal to the fisrtname in the record, then they cant see it. - if it is equal they can.

with this the users can look at their own personal info, passwords ect but no-one elses.

may not be elegant but its working for me.

Cheers

Share this post


Link to post
Share on other sites

Thank you for the reply. If anyone else has suggestions I am interested in learning multiple ways of doing this. I will try out the way suggested. It looks simple enough.

Share this post


Link to post
Share on other sites

I need a little more help. I have done what was explained above and it works great for the main employee pages. I am trying to limit who can view the request for time off pages. I only want the person that submitted it to be able and view it. I used the same technique as above but it is blocking all pages. Any ideas as to what the problem could be? Thanks for your help.

Share this post


Link to post
Share on other sites

Of course since I made the post I just figured it out. Thanks for any potential help though.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.