• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Form not opening correctly based on users role (Using a a view)

Hi there

ACL

Myself            
Person, Manager

Roles
CallManagers
ITPersonnel
Admin
Author
Resolvers

Previously, Line-Manager had same permissions as myself, with exception of Author rather than Manager.  Changed that to be same...

@If(@IsMember("[ITPersonnel]" ; @UserRoles) ; "frmIT_Personnel_Edit"; "frmDetails" )

Still does not work...

Takes  Line-Manager  to "frmDetails".... - quite frustrated with this one - thought I had got the problem solved - no...

Any ideas.

Greatly welcomed..
0
ImraneA
Asked:
ImraneA
  • 7
  • 4
  • 3
  • +1
2 Solutions
 
Sjef BosmanGroupware ConsultantCommented:
Local database? Don't forget to activate Consistent ACL
Otherwise, this should work. I suppose this is a formula to load a subform? Or a form-formula in a view?

By the way, using different forms to hide data from non-authorized users is not the way to protect data... Use controlled-access sections.
0
 
HemanthaKumarCommented:
Use this formula

@If(@IsMember("[ITPersonnel]"; @UserRoles) | @IsMember("[Line-Manager]"; @UserRoles)  ; "frmIT_Personnel_Edit"; "frmDetails" )

~Hemanth
0
 
qwaleteeCommented:
Please create a very simple form with two computed for display fields.  Teh first should have a formula of just @UserRoles.  The second should have a formula as you have specified in your post.  Please report back, for whatever user s having the problem:

1) The values of both fields
2) The value you expected for the second field (i.e., your formula -- frmIT_Personnel_Edit, or frmDetails).
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
ImraneAAuthor Commented:
To - sjef_bosman

1."Local database?" - No, development server
2.Don't forget to activate Consistent ACL - explain ??
3.Otherwise, this should work. - I agree.  Out of curosoity, tried to give another IT user same permissions as myself - it worked.  Previously he had role CommonUsers.

Open correct form...

4."I suppose this is a formula to load a subform?"- No
5."Or a form-formula in a view? " - Yes
6."By the way, using different forms to hide data from non-authorized users is not the way to protect data... Use controlled-access sections. " - I did this from opening screen -
e.g. ITPersonnel button - Formula - @IsMember("[CommonUsers]" ; @UserRoles) -

That leads to ITPersonnel section -
frameset,
LHS (Page->Outline)
RHS (Views)

Each view have a formula - @If(@IsMember("[ITPersonnel]" ; @UserRoles) ; "frmIT_Personnel_Edit"; "frmDetails" )

I'm using "Shared, desktop private on first use" type view.

Would that affect it ?
 
0
 
ImraneAAuthor Commented:
To - HemanthaKumar

See comment to sjef_bosman - note (3).


0
 
ImraneAAuthor Commented:
To -  HemanthaKumar
 + qwaletee

I try both suggestions - my boss on holiday for 3 days - need permission first to get his User.ID file for testing purposes.

He will be checking his email during the day...

Come back to u experts....
0
 
qwaleteeCommented:
Yor problem may be the private shared on first use.  Di yuo previously have a different formula there, or no formula?  Then any user who used the view before you made the change would still have the old view, and would be seeing your prior formula (or non if there was non).

I will repeat Sjef's assertion:  This is no way to do security.  Even if you do it in every view.  And, it is a maintenance headache.
0
 
ImraneAAuthor Commented:
To -  sjef_bosman
1."By the way, using different forms to hide data from non-authorized users is not the way to protect data... Use controlled-access sections.
" - ok..

To -  qwaletee
1."Please create a very simple form with two computed for display fields.  Teh first should have a formula of just @UserRoles.  The second should have a formula as you have specified in your post.  Please report back, for whatever user s having the problem:

1) The values of both fields
2) The value you expected for the second field (i.e., your formula -- frmIT_Personnel_Edit, or frmDetails)."

- tried that - VERY strange - changed opening frameset to have this test form with 2 fields.  Tried it - does not show this - instead goes to another form.

For ALL users - does that mean my application is corrupt ???



0
 
Sjef BosmanGroupware ConsultantCommented:
What happens if you click on the "button" left to the Location at the bottom righthand side of your screen? You should see your access rights and all your roles. If you don't see your roles, you are in a Local db. Please report what you see here.
0
 
ImraneAAuthor Commented:
It says I have Manager access to this database but none of the roles are ticked...

I gone to File -> Database -> Open etcc..

Still same message...

What's happening....

I am getting very frustrated..so near so far..

Any comments most welcomed....

ImraneA

0
 
Sjef BosmanGroupware ConsultantCommented:
So you see several Roles? Well, these roles are yours, whether they are ticked or not. These are the rights and the roles in the current database. Did you have your test-form in this same database? Roles are database-dependent...
0
 
qwaleteeCommented:
To use the test form with the role checking fields, open the form in designer, and chose Design -> Preview In Notes

But I'm still betting on the un-updated private views.
0
 
ImraneAAuthor Commented:
OK - Currently, all my views are "Shared, desktop private on first use".

Qn1: If I recreate all views to just "Shared", would that solve the problem ?

Qn2: What is the best type of view to use in a multi-user server based application ?

0
 
ImraneAAuthor Commented:
To -  qwaletee

Yes - to your question.  It does show form.  If I open within Frameset - No.

ALL my views are "Shared, desktop private on first use".

Qn1: If I recreate all views to just "Shared", would that solve the problem ?

Qn2: What is the best type of view to use in a multi-user server based application ?

Thanks in advance...


0
 
qwaleteeCommented:
ImranE,

Please post the text the form shows when yu open it up on the problem computer!!!!

If you recreate the views to SHARED, you may run into the following problems:

1) Users who already used the view will have a duplicate view, their old desktop private one, and the new one.  They can resolve this by just removing the database from the desktop and re-adding it.  Removing an icon from the desktp removes private desktop views (Notes warns you about this)

2) If the private views were created so that they could pick up different information for each user, you will ose that ability using shared views

the answer to my point #2 ***and*** your question #2 are both the same:  WHat is best depends on what you are trying to accomplish.  There is no universal "multi-user server based aplpication" and therefore there is no "universal answer" as to how to build it, and whether a particular way makes sense.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now