|
|
Etcetera
|
|
|
User
|
len
|
|
Date
|
8/12/2005 2:51 pm
|
|
Views
|
1973
|
|
Rating
|
27
Rate [ | ]
|
|
|
Previous
·
Next
|
len
|
Date: 8/12/2005 2:51 pm · Subject: Group privilege question · Rating: 27
I want a page to be visible only if a user is member of group1 AND member of group2.
Does anybody know how to do this ?
Len Kranendonk www.primaat.com
|
| Back to Top |
Rate [ | ]
|
| |
len
|
Date: 8/12/2005 2:51 pm · Subject: Group privilege question · Rating: -1
I want a page to be visible only if a user is member of group1 AND member of group2.
Does anybody know how to do this ?
Len Kranendonk www.primaat.com
|
| Back to Top |
Rate [ | ]
|
| |
bottelberghs
|
Date: 8/12/2005 2:51 pm · Subject: Re: Group privilege question · Rating: 4
That's a nice one Len. I really had to think for a while, and I'm not even sure I have the best solution. My solution would involve an additional group (call it *both_1_and_2*). You can use the scratch filter to dynamically add members to this group. These have to be members that are in both group 1 AND in group 2. You can use the *If* macro to determine if the user is in both groups, and set a scratch variable accordingly.
I haven't tried it yet, but do you think it will work?
-leendert
|
| Back to Top |
Rate [ | ]
|
| |
len
|
Date: 8/12/2005 2:51 pm · Subject: Re: Group privilege question · Rating: -1
I'm going to create a new group, "both_A_and_B" use the SQL Query option, which is part of the Group properties.
It will be something like this:
SELECT ^GroupText("groupA",1,0); = 1 AND ^GroupText("groupB",1,0); = 1
This will return 1 if user is in groupA AND in groupB.
Len Kranendonk www.primaat.com
|
| Back to Top |
Rate [ | ]
|
| |
bottelberghs
|
Date: 8/12/2005 2:51 pm · Subject: Re: Group privilege question · Rating: 0
OK, I read about this SQL query option, but never actually understood what it does.
So you perform a query which has a boolean result. Does the user have to be specifically in this group already (assigned by an admin), or does the user automatically become a member of this group if the query result turns out to be true?
-leendert
|
| Back to Top |
Rate [ | ]
|
| |
len
|
Date: 8/12/2005 2:51 pm · Subject: Re: Group privilege question · Rating: 5
A user is a member of a group if the SQL query returns boolean 1. Like IP-based groups, there's no need to pre-assign a user to the group.
You'll have to keep in mind that the getUsersInGroup function won't work on pseudo-groups like IP, Scratch filter or SQL external db groups. Mailing to a pseudo group is therefore not possible.
Len Kranendonk www.primaat.com
|
| Back to Top |
Rate [ | ]
|
| |
nuba
|
Date: 8/12/2005 2:51 pm · Subject: Re: Group privilege question · Rating: 4
What about creating a group C, containg both group A and B ?
In the 'Manage Groups', in Admin mode, there's a link for 'Groups in this group', near 'Users in this group.'
|
| Back to Top |
Rate [ | ]
|
| |
len
|
Date: 8/12/2005 2:51 pm · Subject: Re: Group privilege question · Rating: 2
What about creating a group C, containg both group A and B ?
I want a user to be a member of group C *only* if the user is a member of group A AND group B. With groups in group relation, the groups are OR-ed. So in your suggestion a user is member of group C if he is member of group A OR group B.
|
| Back to Top |
Rate [ | ]
|
| |
nuba
|
Date: 8/12/2005 2:51 pm · Subject: Re: Group privilege question · Rating: -1
ooops..
Trying to understand how could I overlook that big AND ?
Sorry
:)
|
| Back to Top |
Rate [ | ]
|
| |
|
|
Recent Discussions Color Key |
| Design: |
|
| Development: |
|
| Et Cetera: |
|
| Install/Upgrade: |
|
| Smoketest: |
|
| Template Group: |
|
Re: Übersetzungen vor dem nächsten Treffen - Translations to be done before the next meeting will take place. by koen - Mon @ 05:17pm Übersetzungen vor dem nächsten Treffen by bernd - Mon @ 03:09pm Re: Synopsis search results by knowmad - Mon @ 10:19am Synopsis search results by marieken - Mon @ 05:49am
|