Admin users can delete other admin users?

nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2005-07-16 02:00

Is the orginal 'admin' user not protected? In other words, if I create a user and add them to the Site Admins, then log in as that new user, I can delete the original 'admin' account.

Yes, you should trust other people you give admin permissions to, but I don't think they should be able to delete the "main" admin account.

Is this as intended or just a side effect of how things are currently setup or is it a bug?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-07-16 02:02

the first admin user (the one that you create during the install steps), is not a special admin, it's just a user which is in the site admin groups.

the only condition there is: at any time, there must be at least one site admin user.

and any site admin user can delete all other site admins.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2005-07-16 02:05

I think either the first admin user created should be a special admin, or there's at least some notice or information about giving other users Site Admin privledges.

For instance. What if I give a good friend Site Admin permission. Then we have a falling out, he logs in, deletes my account and essentially takes over my gallery install. My only saving grace would be that I can log into SSH or FTP and stop him there.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-07-16 02:40

nivekiam, i also like the idea of having the one who installs g2 being a special site admin.

the case you describe sounds reasonable.

meanwhile, we should remember to note this somewher in the docs once we write them.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2005-07-16 06:57
 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sat, 2005-07-16 08:44
Quote:
For instance. What if I give a good friend Site Admin permission. Then we have a falling out, he logs in, deletes my account and essentially takes over my gallery install. My only saving grace would be that I can log into SSH or FTP and stop him there.

Another story might involve giving admin access to someone who is borderline smart enough to use it... and they accidentally delete all the admins or something! OOPS! :)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-07-16 20:50

you people give out admin access to easily :-)

 
buut
buut's picture

Joined: 2003-06-18
Posts: 196
Posted: Sun, 2005-07-17 09:54

(Un)intentional deleting of admin users can be protected with a permission. Like a core.NoAdminRemove permission.

So every gallery owner can spread the admin workload to several people and still be sure that the gallery owner is always in control.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sun, 2005-07-17 10:47

I've always liked the approach of "super admins" and "admins", though you are right the same can be accomplished with a permission as well. I give admin rights to anyone that registers with my gallery! Don't you???

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2005-07-17 15:23

Really? <off to register on fryfrog's gallery> Hey, there's no registration link!! ;)

But yes, that's why I started this thread. I believe there should be one "admin" who is a "super admin" and can't be removed by the "little admins"

 
deezNutz
deezNutz's picture

Joined: 2005-07-06
Posts: 26
Posted: Tue, 2005-07-19 17:43

in most multi user / admin applications there is an option to specify the owner(s) whose account cannot be deleted/changed under any circumstances

So, how about creating a special group called owner and by default putting the user who was created during install into this group?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2005-07-20 02:00

Gallery already utilizes "owner" as owners of objects, just like any system that utilizes the term "owner". An admin is a "god" over the entire system, they may not be owners, but they are more powerful than any owner of any object.

See this thread on a bit more discussion about "special" owners http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=31970&highlight=owner

Though I think we decided on irc that something like that would be better suited to just be a property of an album and not a special permission or special group. Nothing has happened with it though. I don't think there's an RFE for it...