Admin account keeps getting deleted.

bl0m5t3r

Joined: 2008-02-06
Posts: 4
Posted: Wed, 2008-02-06 23:11

let me start by saying that this is a great work of art you (wpg development team) made from this plugin! 99% it plays very smooth and i'm having fun intergrating and customizing wordpress. Next to some shortcommings of gallery (mass edit/permissions) i only have 1 problem, and this is bugging me for a while now, i can't seem to find the problem.

everytime i go to to the 'Gallery2 Users' menu from WPG2 in the wordpress admin it revalidates the user connections to G2, but for some reason it deletes my admin account from table 'g2_usergroupmap'. so where normally there should be a mapping "6" (my account) to "3" (admin user group), it removes this line.

In the menu in the wpadmin it shows me a User withou admin rights, but when i compare it to the database my account is removed (as described above). i will still be in 'g2_externalidmap' and thus G2 will give me a permission denied when i try to visit G2 as admin (since i'm not in 'g2_usergroupmap').

for the moment everytime i go to the 'Gallery2 Users' menu, i manually use phpmyadmin to recreate the link in 'g2_usergroupmap' so i can go about my business until the next time i have to visit the 'Gallery2 Users' menu.

Also in the menu there is no option of making myself or any user admin on G2. only allow and deny a regular user. With rolemanager i can see (and also in 'wp_usermeta' in the serialized table) that i should have the ability to be and/or make someone admin.

I've tried many option, went through a bunch of mysql tables, checked some code, but i can't seem to lay my fingers on the problem area (i'm no php guru, but have a basic understanding of it and of sql).

i'm not sure what kind of info i need to give you, so here's alle the standard stuff. i hope this can be resolved quickly.the adres is address: blackspace.nl

G2 + server info:

Quote:
Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.4 apache2handler
Webserver = Apache
Database = mysql 5.0.45-community-nt, lock.system=flock
Toolkits = Exif, LinkItemToolkit, SquareThumb, Thumbnail, NetPBM, Ffmpeg
Acceleration = partial/21600, partial/21600
Operating system = Windows NT P182 6.0 build 6001
Default theme = wordpressembedded
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Rows in GalleryAccessMap table = 13
Rows in GalleryAccessSubscriberMap table = 1081
Rows in GalleryUser table = 3
Rows in GalleryItem table = 1077
Rows in GalleryAlbumItem table = 13
Rows in GalleryCacheMap table = 53

WP:

Quote:
Version 2.3.3 (but had the problem with older versions too, just upgraded)

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-02-07 00:14

You can verify your account has G2 Admin Rights by visiting the Gallery2 Users Tab under Dashboard -> Users -> Gallery2 Users and verify that account belongs to the Wordpress Users with Gallery2 Admin Accounts Group..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
bl0m5t3r

Joined: 2008-02-06
Posts: 4
Posted: Thu, 2008-02-07 00:38

i hope I'm not being too confusing, just trying to give as much info as a i can to help solve this problem.

no i cannot, i show up as regular user without any option to upgrade as admin, as described in paragraph 3 and 5 of my initial post. though i have to admit its kind of a messy post to start with.every time i go to the Dashboard -> Users -> Gallery2 Users my rights are taken away

if i give can you any kind of access (cause i understand the problem keeps being a little abstract this way) and you would have the time to go about, i'd be glad the accept it.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-02-07 00:54

Grab and install the following plugin (Role Manager) -> http://www.im-web-gefunden.de/wordpress-plugins/role-manager/

Navigate to Wordpress Dashboard -> Users -> Edit your User

Under the Assign extra capabilites make sure Gallery2 Admin is selected.

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
bl0m5t3r

Joined: 2008-02-06
Posts: 4
Posted: Thu, 2008-02-07 01:30

even though your reply was not directly helpful(no disrespect), the solution was close by (and i've been agitated for months now :P)

i jumped the gun and was already writing you a pm with login stuff for wp,gallery,phpmyadmin and everything. like if you would have time, the possibility would be there. but while i was doing that, i noticed the newly made login i made for you (wp admin) got a nice G2 admin position (as it should be) directly when i made it. so after i checked the gallery2 user menu again.. you were there (as G2 admin) and i wasn't. i checked 'g2_usergroupmap' again, and you were there and i got deleted (again). you were even there 3 times (guest,user & admin), so i added myself again and started checking with role manager again where the problem might be.

turned out, the only place where I (wp_admin, gallery user #6) showed up as not having the rights to gallery admin was under "->users->ME(bl0m5t3r)-> edit user", before i'd been using the menus (using the revoke/roles/capabilities etc. menu's) and in those menus i showed up as admin of G2.

when i tried to change my status i got another error, the fact that there is a space in the capability (being G2 admin) is not allowed. so luckely there is an option in role manager to releax the standard under "# Role-/Capability Management General" then "Spaces allowed in Capabilities".

after doing those trivial settings i could go back to my user settings and change myself back to G2 admin. even though i still got an error. all seems to be fixed now.

the only thing i'm wondering about, and i hope someone can help me with is, the table that this info is stored in. because i much rather work a little sql, then dig into the menus of an php aplication to fix something like this. (which i would learn anyhow to understand the logic of changing the table :P)

anyhow, i read some more post about this problem on the forum here. Some almost 2 years ago, without solution, hope you can find some help in this post.

jr=

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-02-07 01:47

In Gallery2, Admin Rights are granted if the user belongs to the Admin Group. In WPG2 if the User has G2 Admin Capability then the WPG2 checks to ensure the User is also a member of the Gallery2 Admin Group (grants rights if the person is not)..

Thus adding your user (manually) to the Admin group was not the solution, checking to ensure your User had G2 Admin Capability which is what I posted for you to do (the post did you did not find helpful) was the solution to your issue..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
bl0m5t3r

Joined: 2008-02-06
Posts: 4
Posted: Thu, 2008-02-07 02:07

with all and every utmost respect to you, i did check it.

It was when i started making new admin users (for you to investigate the problem, which i hoped you would have the time to do), that those users were getting more rights then i was. I noticed before i didn't get the rights i deserves (which you&i are describing above).

but lets not quarrel about it.. I'm glad it's fixed, i just think there is a little glitch in the g2<>wp admin conversion. Apparently somewhere along the lines my admin rights to G2 got revoked in WP and WPG reflected that, every time i visited the "gallery2 users" menu.
this is also the reason I'm asking about the tables, just to do more investigation in the interest of everybody.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-02-07 11:03

bl0m5t3r,

A few points..

A) WP capacities are stored as serialised array in the options table so this is not something you can just insert data into..
B) WPG2 does not have an admin conversion, if the Person's role has the G2 Admin capability then that is applied automatically to the individuals capabilities (standard WP).. The accounts G2 Admin rights are directly dependent on having G2 Admin capabilities..

Older versions of the WPG2 did this a different way which proved to be problematic, until your post I never heard of any issues with assigning G2 Admin rights in the WPG2 3.x

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo