Hi,
For some reason that I can't figure out, I can't edit (or create) a node relativity query unless I am logged in as the primary user. I get the access denied message under my admin login, but I get the query page when I'm logged in as the primary user. This is a bit of a bother since I am NOT the primary user, just the main developper. I'm using the 08/20/06 CVS version. All access rights are set and equal (e.g., I can create all other types of content whether i'm logged in as primary or as admin), so I don' t understand what's the reason for this behavior is. I only really used the previous version of the module for a day but the problem didn't show up then, as far as I remember. Any idea why?
BTW, otherwise this module does absolute magic when you need to create a usable data structure that's modeled after a real-world hierarchical document workflow. Thanks.
efolia
Comments
Comment #1
darius commentedMaybe it's obvious, or most probably I just don't know the terminology - but what is a PRIMARY user? Make sure you have "administer content" access. I need some better bug info, because things seem to be working fine for me.
Darius
Comment #2
efolia commentedBy primary, I mean the user that's set up when you install Drupal (and I doubt this is the official terminology). Anyways, I tried to build a new query it won't allow me (access denied) unless I'm logged in as *primary*. There is no difference between my role settings as admin and that of the primary user. Actually there's nowhere to set special rights for primary user access (which are role-based, except for the database updating rights in the modules section, but that's mySQL dependant). It's not a big deal, because I have access to that account, but I am not the primary user since I do not own the website. Then again, this is probably not be a *bug* per se, just something I don't know about Drupal. I find this really strange since *note relativity* is the only module that has that requirement (the web site has about 25 modules installed and running).
I'm working on a .po for the french language. It should be done and tested relatively (!) soon. It's a little tricky since most of it is often context implementation-dependant.
efolia
Comment #3
darius commentedHmm, so:
- you have admin user (user id 1), for whom access is denied
- "primary" user (user id ?), for whom access is allowed
- any other user - access denied?
Did I get this right? What's the primary user id? I am trying to figure out how to replicate your bug.
Comment #4
efolia commentedActually the primary user is user/1 ;-)
Admin (which is me) is user/2
And yes, every other user, no matter what role they have, has access denied when it comes to adding a new relativity query. I made sure the database and modules are updated so this is not the source of the problem. I uninstalled it, removed it, re-installed it and still the same problem. I even tried adding a new user with full roles and access to test it. I still have to log in as user/1 if i want to edit a new query.
I will probably help you to know that the *node relativity query* appears under the *Create content* menu only for user/1, and not for the others. user/1 and user/2 have the exact same role setting. As I said, I did run the Drupal update script just to be sure (then again, it should not matter because no new user were added nor any role changed since installing the module). I can't try it right now, but as I remember it, when I install the module under user/2 (for example), I have access rights to the query module, only this right disapears as soon as I disconnect and it remains accessible only to user/1. I shall verify this again once I can play with the site tomorrow if needed.
The only hint I would have if i was working on that problem is that it might be a mySQL-related issue. user/1 is the only user who has access right to the database from within Drupal (because its name and pwd are hardcoded in Drupal settings). As far as I know (but I don't know that much), this is the only difference between user/1 and other users with the same role settings.
efolia
Comment #5
darius commentedI think I found the bug! It's fixed in the CVS HEAD version. Patch attached. Please verify it solves your problems...
Comment #6
efolia commentedIt works (after uninstalling and reinstalling the module and corresponding access rights, as usual).
Thanks for the quick fix, that'll help me a lot (i wont have to log in as someone else and risk making identity mistakes).
Actually, I wonder why it didnt work in the first place, since all you did is add the menu in the block -- and it points to the same node/add/relativity_query as the menu on the main Create a content page does (I forgot to mention that before). I swear I tried the uninstall/reinstall process over and over before. Weird.
Anyhow, again, thanks a lot. :-)
efolia
Comment #7
darius commentedIt's not intuitive, but in Drupal, the menu takes care of access control. I changed
user_access('administer content'), which was outdated, touser_access('create node relativity queries').Comment #8
darius commentedComment #9
(not verified) commented