[AppDB] Allow admins to remove their admin rights

Chris Morgan chmorgan at gmail.com
Wed Jun 4 10:37:15 CDT 2008


On Wed, Jun 4, 2008 at 4:15 AM, Alexander Nicolaysen Sørnes
<alex at thehandofagony.com> wrote:
> På Onsdag 04 juni 2008 , 01:24:07 skrev Chris Morgan:
>> What new policy on dissidents? ;-)
>>
>> How does this patch enable admins to remove themselves? I'm afraid I
>> can't see how this change lets an admin remove their own admin status.
>>
>> Chris
>>
>>
>
> Yea, that particular piece of code isn't very clear on what it's doing.  I
> found out that $aClean['iUserId'] would only be set when modifying another
> user, and it previously compared it to $oUser->iUserId before allowing the
> admin removal.  Now we only check for admin rights, and the oUser->iUserId ==
> aClean['iUserId'] check is performed later to see if we should redirect back
> to the user admin page.
>
>

So if the admin was removing their own admin status $aClean['iUserId']
wouldn't be set? If this is the case we should document it there
because otherwise the functionality is confusing.

How does the redirect relate to removing admin rights?

Chris



More information about the wine-devel mailing list