DashboardHooks::updateModel_afterStructure_handler PHP Method

updateModel_afterStructure_handler() public method

After executing /settings/utility/update check if any role permissions have been changed, if not reset all the permissions on the roles.
public updateModel_afterStructure_handler ( $sender )
$sender
    public function updateModel_afterStructure_handler($sender)
    {
        // Only setup default permissions if no role permissions are set.
        $hasPermissions = Gdn::sql()->getWhere('Permission', array('RoleID >' => 0))->firstRow(DATASET_TYPE_ARRAY);
        if (!$hasPermissions) {
            PermissionModel::resetAllRoles();
        }
    }