Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The way the module is working atm, granting the permission to "administer own group vocabulary" grants the permission to administer any group permissions. Assuming this is working as intended the option should probably be renamed as suggested in the title?
Comment | File | Size | Author |
---|---|---|---|
#1 | og_vocab-renamed-permission.patch | 1.33 KB | Tim_O |
Comments
Comment #1
Tim_O CreditAttribution: Tim_O commentedAfter having found out how to create patch-files I looked into renaming this. Just wanted to make another step in getting used to contributing (and getting rid of items on "my" list). And renaming that itself was easy, I submit the patchfile enclosed. However this patchfile would only fix this for new installations, existing installations having granted the right "administer own group vocabulary" to ANY role will need to get according entries in the permission table fixed! So don't apply if you don't know what you're doing!
So, to properly fix this, we will need an update routine in og_vocab.install? I am guessing here, but there's something similar in it. In table permission there is an entry for each role. For each role having the entry "administer own group vocabulary", this needs to be renamed to "administer group vocabularies". I figured out the following code to achieve this on the MySQL-CLI:
UPDATE permission SET perm = REPLACE(perm, 'administer own group vocabulary', 'administer group vocabularies');
But I don't know how to properly embedd this into code. I found a snippet in og_vocab.install where it might fit. Something like
could do the job. Don't know what xyz (a number) specifies. The number of the update-function? The version to apply the update on? Also I don't understand why there is an empty array created and returned. Can anyone point me in the right direction on this? Is this otherwise sound?
Comment #2
Tim_O CreditAttribution: Tim_O commentedOh, and there is a de.po file in the translations folder. In this the following lines would need to be changed (showing the changed lines here):
Was this delivered with the module? For me all the german Umlaute (ä,ö,ü) are cryptic in this file, quess this is something about used language-pages or something? So no clue how to fix these for all atm.
Comment #3
amitaibu@Tim_O,
Thanks, I'll review your patch in a couple of days (busy porting OG7)
Comment #4
fadgadget CreditAttribution: fadgadget commentedHi this still seems to be the way with the latest 6.1.dev version. Anyone that admins a groups seems to be able to edit the taxonomies of ANY group that they are a member of. Is there a solution for this as its a bit of a bugger.
thanks