/** * Delete a permission. * * When $withForce is set to true, the removal cannot be undone. If set to false it can be undone. * * @param string $permissionName The name of the permission. * @param boolean $withForce Should it be really deleted? * @return void **/ public function deletePermission($permissionName, $withForce = false) { if ($this->permissions->exists($permissionName, true)) { return $this->permissions->deletePermission($permissionName, $withForce); } throw new \InvalidArgumentException("Permission doesn't exist"); }
/** * Delete a role. * * When $withForce is set to true, the removal cannot be undone. If set to false it can be undone. * * @param string $roleName The name of the role. * @param boolean $withForce Should it be really deleted? * @return void **/ public function deleteRole($roleName, $withForce = false) { if ($this->roles->exists($roleName, true)) { return $this->roles->deleteRole($roleName, $withForce); } throw new \InvalidArgumentException("Role doesn't exist"); }