Page 1 of 1

Can't get roles to work consistently

PostPosted: Thu Jan 07, 2010 10:54 pm
by Bob Cergol
I have set two global SQL vars in my core order view dictionary with "role A" checked.

I have used these two columns in a report in both totals and details.

I run this report logged in under two different user accounts, one with role A checked, the other with role A unchecked.

The report output in both cases is identical. Both fields display.

I thought I had tested this and had it working once -- but I must have been dreaming! :)

I could clone reports, assign them to different user/groups and remove those fields, but I'd really like to use roles.

Today I did experience roles working -- the reverse of what I expected, i.e. I thought a user must be checked for roleA to see fields likewise checked, but that was preventing them from showing up. So I started over and tried this simple test to make sure I understood the logic.

But now its not working in either case. I must be doing something wrong but its too simple for me to see it.

Bob

Re: Can't get roles to work consistently

PostPosted: Fri Jan 08, 2010 12:15 am
by Carsten Sørensen
Hi Bob,

You are not doing anything wrong. The Roles have impact on all fields except Global SQL Vars. Funny that nobody ever ran into that - but I guess it must be the combination of the relative rare use of Global SQL Vars especially in combination with roles on exactly those columns. Another more fair explanation is that SQL columns when defined locally would not be possible to role -protect and therefore it might have made sense at the time of design to treat Global SQL vars the same way...

I think it makes sense what you are trying to do - so I will look into it and if possible fix it!

btw: you probably saw it working on normal columns - and then not on Global SQL Vars.

Best regards
Carsten

Re: Can't get roles to work consistently

PostPosted: Fri Jan 08, 2010 1:03 pm
by Carsten Sørensen
Hi Bob,

We have now added the additional Roles checking for Global SQL Vars as well. I remember now how they ended up in the dictionary (used to be stored elsewhere) and I believe that's the reason they were not treated as other dictionary entries in terms of roles. That's a bug - and that is fixed now! Will be available with the next release.

Thanks for letting us know about it! - and sorry for the inconvenience in your attempts to get it to work!

Best regards,
Carsten

Re: Can't get roles to work consistently

PostPosted: Fri Jan 08, 2010 3:18 pm
by Bob Cergol
Carsten,

Yes, that's exactly what happened. I suspected the issue was specific to SQL vars and so I started applying the roles to normal columns and then got sidetracked when those columns were not showing up for me but were showing up for a "lesser" user account. Sometimes I wonder if I'm dyslexic!

Thanks for extending this feature to include SQL variables.

Bob