Module: nagvis Branch: master Commit: d88a2bb4289024ab837b09e48f4b01358e8c554c URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=d88a2bb4289024ab837b09e48f4b01358e8c554c
Author: Lars Michelsen <[email protected]> Date: Sat Oct 2 17:34:55 2010 +0200 Added missing permissions for map management dialog --- share/server/core/classes/CoreMySQLHandler.php | 4 ++++ share/server/core/classes/CoreSQLiteHandler.php | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/share/server/core/classes/CoreMySQLHandler.php b/share/server/core/classes/CoreMySQLHandler.php index 7b2c4c8..43726ad 100644 --- a/share/server/core/classes/CoreMySQLHandler.php +++ b/share/server/core/classes/CoreMySQLHandler.php @@ -177,12 +177,14 @@ class CoreMySQLHandler { // Create permissions for WUI management pages $this->query('INSERT INTO perms (`mod`, `act`, obj) VALUES (\'ManageBackgrounds\', \'manage\', \'*\')'); $this->query('INSERT INTO perms (`mod`, `act`, obj) VALUES (\'ManageShapes\', \'manage\', \'*\')'); + $this->query('INSERT INTO perms (`mod`, `act`, obj) VALUES (\'Map\', \'manage\', \'*\')'); // Assign the new permission to the managers $RES = $this->query('SELECT roleId FROM roles WHERE name=\'Managers\''); while($data = $this->fetchAssoc($RES)) { $this->addRolePerm($data['roleId'], 'ManageBackgrounds', 'manage', '*'); $this->addRolePerm($data['roleId'], 'ManageShapes', 'manage', '*'); + $this->addRolePerm($data['roleId'], 'Map', 'manage', '*'); } // Only apply the new version when this is the real release or newer @@ -273,6 +275,7 @@ class CoreMySQLHandler { $this->query('INSERT INTO perms (`mod`, `act`, obj) VALUES (\'ManageShapes\', \'manage\', \'*\')'); // Access controll: Edit/Delete maps and automaps + $this->query('INSERT INTO perms (`mod`, `act`, obj) VALUES (\'Map\', \'manage\', \'*\')'); $this->query('INSERT INTO perms (`mod`, `act`, obj) VALUES (\'Map\', \'add\', \'*\')'); $this->query('INSERT INTO perms (`mod`, `act`, obj) VALUES (\'AutoMap\', \'add\', \'*\')'); @@ -300,6 +303,7 @@ class CoreMySQLHandler { $this->addRolePerm($data['roleId'], 'General', '*', '*'); // Access assignment: Managers => Allowed to edit/delete all maps + $this->addRolePerm($data['roleId'], 'Map', 'manage', '*'); $this->addRolePerm($data['roleId'], 'Map', 'delete', '*'); $this->addRolePerm($data['roleId'], 'Map', 'edit', '*'); diff --git a/share/server/core/classes/CoreSQLiteHandler.php b/share/server/core/classes/CoreSQLiteHandler.php index cdf204a..8620776 100644 --- a/share/server/core/classes/CoreSQLiteHandler.php +++ b/share/server/core/classes/CoreSQLiteHandler.php @@ -175,12 +175,14 @@ class CoreSQLiteHandler { // Create permissions for WUI management pages $this->DB->query('INSERT INTO perms (mod, act, obj) VALUES (\'ManageBackgrounds\', \'manage\', \'*\')'); $this->DB->query('INSERT INTO perms (mod, act, obj) VALUES (\'ManageShapes\', \'manage\', \'*\')'); + $this->DB->query('INSERT INTO perms (mod, act, obj) VALUES (\'Map\', \'manage\', \'*\')'); // Assign the new permission to the managers $RES = $this->DB->query('SELECT roleId FROM roles WHERE name=\'Managers\''); while($data = $this->fetchAssoc($RES)) { $this->addRolePerm($data['roleId'], 'ManageBackgrounds', 'manage', '*'); $this->addRolePerm($data['roleId'], 'ManageShapes', 'manage', '*'); + $this->addRolePerm($data['roleId'], 'Map', 'manage', '*'); } // Only apply the new version when this is the real release or newer @@ -295,6 +297,7 @@ class CoreSQLiteHandler { $this->DB->query('INSERT INTO perms (mod, act, obj) VALUES (\'ManageShapes\', \'manage\', \'*\')'); // Access controll: Edit/Delete maps and automaps + $this->DB->query('INSERT INTO perms (mod, act, obj) VALUES (\'Map\', \'manage\', \'*\')'); $this->DB->query('INSERT INTO perms (mod, act, obj) VALUES (\'Map\', \'add\', \'*\')'); $this->DB->query('INSERT INTO perms (mod, act, obj) VALUES (\'AutoMap\', \'add\', \'*\')'); @@ -322,6 +325,7 @@ class CoreSQLiteHandler { $this->addRolePerm($data['roleId'], 'General', '*', '*'); // Access assignment: Managers => Allowed to edit/delete all maps + $this->addRolePerm($data['roleId'], 'Map', 'manage', '*'); $this->addRolePerm($data['roleId'], 'Map', 'delete', '*'); $this->addRolePerm($data['roleId'], 'Map', 'edit', '*'); ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
