Jump to content

Record Access Privileges not working right


Brad Mathews
 Share

This topic is 2242 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I must be doing something wrong here - I can't get record access privileges working right.

I am trying to limit viewing of the Teachers table to the currently logged in teacher.

  • I have a Teacher Privilege Set and all teachers are assigned this set.
  • I have Custom Privileges set for Records.
  • On the Teachers table I have Limited set on the View privilege.
  • My calculation is 'Login = Get(AccountName)' where Login in a field that holds the login name.

No records are accessible, all fields just say <No Access>. Using Data Viewer I have double checked to make sure that the Get(AccountName) value is the same as the value in the Login field.

I have even done this calculation: Login = "Brad Mathews" which I KNOW is a valid field value. Still nothing but <No Access>.

I have attached a screenshot showing all of my settings.

Thanks!

- Brad

 

RecordAccess.png

Link to comment
Share on other sites

At first glance that looks ok.  The only reasons that I can see it fail is that either:

- the "Login" field does not contain that value.  Perhaps it contains multiple values, return delimited, perhaps it has extra whitespace that would prevent it from matching to your test.  How do you populate the "login" field?

- or the Get(AccountName) does not return the value that you think it does return the value that you think it does.

Link to comment
Share on other sites

Wim,

Yeah, those were also my first suspects. I even went so far as to copy/paste the login from the Edit Account window into the Login field to make sure there were no typos, extra spaces, invisible non-ascii characters and the like. I used the Data Viewer to verify that Get(AccountName) was returning the correct value, and it was.

So I went back and re-read the docs and found this line I did not fully digest the first time: "Users that cannot view certain records can still browse these records, but the user will see <No Access> instead of the field data within each record."

I had assumed it would filter the records. If I scroll through the records, it does indeed show the logged in users' record. So I was not doing anything wrong, I was just blind.

Of course that is not the effect I want, so I added a Perform Find to the OnLayoutEnter to get the proper UX. For others' reference: Do a find on any field using * as the criteria. Apparently any find will filter out the <No Access> records. Show All Records brings them back.

  • Like 1
Link to comment
Share on other sites

This topic is 2242 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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