Skip to content

Commit

Permalink
Update app_defaults.php
Browse files Browse the repository at this point in the history
  • Loading branch information
markjcrane authored Dec 8, 2019
1 parent b5909d3 commit 37bf97f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions core/groups/app_defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,22 @@
unset($array);
}

//drop the view_groups
$database = new database;
$database->execute("DROP VIEW view_groups;", null);

//add or update the view
$sql = "CREATE VIEW view_groups AS (";
$sql .= " select domain_uuid, group_uuid, group_name, ";
$sql .= " (select count(*) from v_group_permissions where group_uuid = g.group_uuid) as group_permissions, ";
$sql .= " (select count(*) from v_user_groups where group_uuid = g.group_uuid) as group_members, ";
$sql .= " group_level, group_protected, group_description ";
$sql .= " from v_groups as g ";
$sql .= ");";
$database = new database;
$database->execute($sql, null);
unset($sql);

}

?>

0 comments on commit 37bf97f

Please sign in to comment.