Groups question

  • Thread starter Thread starter erick-flores
  • Start date Start date
E

erick-flores

hello all

If I have 6 groups and I want only Group2 to see ONLY the information
from Group 4 and Group3 ONLY to see the information from Group5. How do
I do that?

I have already created the groups and put the users in the correct
groups, now I need to be able to do the above


Thanks
 
Can you give us some more information?

1. When you say "groups" do you mean user-level security (ULS) groups set up
through Tools>Security>User and Group Accounts?

2. When you say "information from GroupN" do you mean records that have been
created by a member of GroupN?

3. How is your application recording who "owns" the data? Are you writing
the CurrentUser value into each new record?

4. Do you want users to be able to see their own group's data as well?

If you really are using ULS groups then the problem is that a user may
belong to more than one group. A FAQ here is "how do I know what group a
user belongs to?" The answer is that you cannot, because there might be
several. You can find which *groups* a user belongs to, or find if a given
user is a member of a given group.

Either way, it seems you are talking about row-level security, which can
only be implemented through a query which has a WHERE clause to decide
whether to show the record or not.

Post back with some more details and we'll try to help you some more.
 
Graham said:
Can you give us some more information?

1. When you say "groups" do you mean user-level security (ULS) groups set up
through Tools>Security>User and Group Accounts?
Yes, right now I only have two groups. Admin and EnterData and of
course the User group.The Admin can see/modify everything, the
EnterData can only see his own information/records and can only see
some of the forms.
2. When you say "information from GroupN" do you mean records that have been
created by a member of GroupN? Yes

3. How is your application recording who "owns" the data? Are you writing
the CurrentUser value into each new record?
Yes, I have a field call CurrentUser in each table that will record who
created the record.
4. Do you want users to be able to see their own group's data as well?
Yes. This is the deal, my boss wants me to create this multiple groups
so manager from the different departments can ONLY see the information
from the employees under their departments, so for example Accounting
manager can only see information/records from the accounting employees.
You know what I mean? so I have around 4 departments. And the Admin
group that will be able to see ALL the records.

Is there a way where I can say:
if groups=Department1 then
groups=Department1employees.visible = true
else
groups=department2.visible = false
groups=department2emploees.visible = false
 
Hi Erick

Thanks for the extra information. I have a couple more questions:

1. Is it possible for an employee to *simultaneously* belong to two or more
departments? If so, then which *department* would own the data written by
that user?

2. Is it possible for an employee to *switch* departments? If so, would
data previously written by that user belong to the old department or the new
one?

3. In your initial post you mentioned that Group2 could see information from
Group4 (as well as, presumably, information from itself, Group2). Is this
still a requirement, and if so, how are these "super groups" defined?
 
Ok, so this is what I did. I add a field to my employees table call
"UserGroupName". I created the groups I needed and set each user under
their respective group. Then I will be manually writing the name of the
group for each user in the Employee table. Since there are only around
40 employees its not a big deal for me. Then I set each form to look
for that "UserGroupName" and run the query that I wanted for each
particular Group. So if UserGroupName = "Ind Prod Admin" then
Me.Recordsource = query. I did the same for all my forms and everything
its working just fine. I know its not the BEST way to do it because I
will have to be manually writing under the Employee table the
UserGroupName, but I dont really care since there are not a lot of
employees, and It will only take me 1 minute to do it. So, so far so
good...Thanks for your help
 
I'm glad you've got it working, Erick.

I suggest you have an additional table of UserGroups (GroupID, GroupName),
with relationships to both your employee table and your main data table.
That will make the Employees table much easier to maintain (you can have a
combo box for the Group) and will also give you much better data integrity.
 
Back
Top