Export roles and permissions.

Can I export roles and associated permissions for import into another Gibbon site?

Hi Tieuku, these data are stored in the tables gibbonRole and gibbonPermission. If you use MySQL to export these from one installation, you can then import the values into another. You’d need to drop any existing values in those tables to get an import with no errors. Cheers, Ross.

Hi Tieuku,

From a technical standpoint it’s not quite possible to export the exact roles and permissions that a particular school uses, because it’s a relational database the permissions relate to action ID numbers, and the IDs of those actions are going to be different for different systems based on any number of modules or modifications they’ve made.

In this case, the most useful tool here is the Duplicate action in the Manage Roles area. This lets you set up one role as you’d like, then duplicate it to make a new role with very similar permissions.

Hello Sandra,

I found myself thinking about this same topic again and found my own discussion.

I understand what you said about this not being possible because it relates to action ID numbers which will/could be different for next school for the reasons you gave.

The duplicate action is not the solution in this case. I was trying to find a way of not creating the same standard let’s say School Administrator or Librarian role (with associated permissions) for new schools with similar needs.

Hi Tieku, I can see where this would be useful for new school setup. The trick with creating any kind of import/export is that there are three layers of records, Roles, Actions, and Permissions, and each are tied to relational IDs and not easily transferred between systems, especially those already up and running.

My recommendation would be to install a fresh copy on your local system and setup a sort of demo-data for yourself. If, in a fresh system, you were to setup the standard set of roles and permissions you’re looking to use, then you could export the contents of the gibbonRole, gibbonAction and gibbonPermission tables. In a fresh install, if you were to clear these tables and import your own set of data for these three tables, you should be able to create a set of initial values you can use as needed. Hope this helps!

Thanks Sandra, I see how making use of these tables will work.

Maybe a less techy approach will be to set up a fresh system with my standard set of roles and permissions that will serve as my “starter”/template site,

My web host does a good job of letting me clone my PHP sites; I’ll just have to change the guid, Base URL and Base Path

Sounds like a solid approach.