Search code examples
joomlajoomla2.5

Can I change permissions for a category in Joomla 2.5 without corrupting asset table?


Can I change work around the Admin Console, and changed the permissions directly in the DB, without corrupting Joomla'a Asset Table?

We are using Joomla 2.5 for a unique application where we had to create thousands of categories. The only issue is that we cannot change the permissions of a particular category using the Admin Console because it times out. We just want to change the permission of Edit from "Inherited" to "Allowed".

The category we are changing the permissions on is not a parent of any other category.

This is not a common task.


Solution

  • Best way is to temporarily increase the execution time in your php.ini file. but still if you want to go ahead and make the changes than it wont corrupt the database unless you commit a blunder. If the permissions for Create Delete Edit etc are inherited then the values in the rules field will look like this

    {"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}
    

    And once you make the edit from inherited to Allowed it becomes

    {"core.create":[],"core.delete":[],"core.edit":{"1":1},"core.edit.state":[],"core.edit.own":[]}
    

    So core.edit has an array with key 1 and value 1. You can change similarly for others but be careful changing database directly. Remember key one is for Public permission. Similarly if you need to change for manager it becomes

    {"core.create":[],"core.delete":[],"core.edit":{"1":1,"6":1},"core.edit.state":[],"core.edit.own":[]}
    

    You can see a key 6 is added with value 1 which means the Manager has rights to edit.Key 1 and 6 are group ids of public and Manager respectively. You can get the group ID's if you go to Users->Groups. Right side id will be displayed for each individual group. So suppose you want edit functionality for publisher which is having group id 5 then the rules column will be like this

     {"core.create":[],"core.delete":[],"core.edit":{"1":1,"6":1,"5":1},"core.edit.state":[],"core.edit.own":[]}