MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Alexander Newald Date:July 26 2004 3:53pm
Subject:Re: Re[2]: nested sets
View as plain text  
> Hello Aman,
>

[..]

>
> I think he was talking about user roles.
> one creates a role and then assigns that role to the users.
> When one changes the role rights then automatically users' rights
> change according to the roles they have.
>

The main problem I have to do the "rollback". A 2nd table is no option
because it might be possible that another users rights get be change before
the rights of the first user has been restored.

Using

+---------+---------+--------------------+-----+-----+----+----+----+
| node_id | root_id | user               | lft | rgt | a  | c  | d  |
+---------+---------+--------------------+-----+-----+----+----+----+
|       1 |       1 | User1              |   1 |   4 | 1  | 0  | 0  |
+---------+---------+--------------------+-----+-----+----+----+----+
|       2 |       1 | User2              |   2 |   3 | 1  | 1  | 1  |
+---------+---------+--------------------+-----+-----+----+----+----+

and using 1 or 0 for the a, c and d col would give the rights to the users.
But how to check if the rights of the "parent" user do not are lower?

In the exmaple above how to get 0 for c and d for User2 (because User2 is a
subuser of User1)?

Alexander Newald

Thread
nested setsAlexander Newald26 Jul
  • Re: nested setsAman Raheja26 Jul
    • Re[2]: nested setsDebugasRu26 Jul
      • Re: Re[2]: nested setsAman Raheja26 Jul
  • Re: Re[2]: nested setsAlexander Newald26 Jul
  • Re: Re[2]: nested setsAlexander Newald26 Jul
  • Re: Re[2]: nested sets - Perhaps a solution!Alexander Newald27 Jul