You are here

function hostmaster_install_set_permissions in Hostmaster (Aegir) 5.x

Set the permission for a certain role

1 call to hostmaster_install_set_permissions()
hostmaster_profile_final in ./hostmaster.profile
Perform any final installation tasks for this profile.

File

./hostmaster.profile, line 312

Code

function hostmaster_install_set_permissions($rid, $perms) {
  db_query('DELETE FROM {permission} WHERE rid = %d', $rid);
  db_query("INSERT INTO {permission} (rid, perm) VALUES (%d, '%s')", $rid, implode(', ', $perms));
}