src/snac/server/database/DBUser.php
/**
     * Add a privilege to a role
     *
     * The privilege must exist before calling this. Use createPrivilege().
     *
     * This is an alternate to adding the priv to the role, then calling writeRole(). Having two ways of
     * adding a priv to a role is probably less than ideal.
     *
     * @param \snac\data\Role $role The role.
     * @param \snac\data\Privilege $privilege is a Role object. Role object has identical fields to privilege.
     */
Add a privilege to a role
The privilege must exist before calling this. Use createPrivilege().

This is an alternate to adding the priv to the role, then calling writeRole(). Having two ways of
adding a priv to a role is probably less than ideal.

@param \snac\data\Role $role The role.
@param \snac\data\Privilege $privilege is a Role object. Role object has identical fields to privilege.
Add a privilege to a role The privilege must exist before calling this . Use createPrivilege () . This is an alternate to adding the priv to the role then calling writeRole () . Having two ways of adding a priv to a role is probably less than ideal . @param \ snac \ data \ Role $role The role . @param \ snac \ data \ Privilege $privilege is a Role object . Role object has identical fields to privilege .
public function addPrivilegeToRole($role, $privilege)
    {
        $role->addPrivilege($privilege);
        $this->sql->insertPrivilegeRoleLink($role->getID(), $privilege->getID());
        return true;
    }
public function addPrivilegeToRole ( $ role , $ privilege ) { $ role -> addPrivilege ( $ privilege ) ; $ this -> sql -> insertPrivilegeRoleLink ( $ role -> getID ( ) , $ privilege -> getID ( ) ) ; return true ; }
Add a privilege to a role
 The privilege must exist before calling this.
Add a privilege to a role The privilege must exist before calling this .