summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael pereira2011-03-29 11:49:22 +0200
committermichael pereira2011-03-29 11:49:22 +0200
commitbb6cbedc2c76c370febb0472db6e70f2415e80f0 (patch)
tree4faff5cbb78b57ec621e5584d073f53b00774d26
parentResource Controller fertig (diff)
parentShortcut und RightCategoryID in Rightmapper hinzugefügt (diff)
downloadpbs2-bb6cbedc2c76c370febb0472db6e70f2415e80f0.tar.gz
pbs2-bb6cbedc2c76c370febb0472db6e70f2415e80f0.tar.xz
pbs2-bb6cbedc2c76c370febb0472db6e70f2415e80f0.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
-rw-r--r--application/models/Right.php10
-rw-r--r--application/models/RightMapper.php18
-rw-r--r--pbs.sql165
3 files changed, 108 insertions, 85 deletions
diff --git a/application/models/Right.php b/application/models/Right.php
index 874453c..2f49bd9 100644
--- a/application/models/Right.php
+++ b/application/models/Right.php
@@ -4,6 +4,7 @@ class Application_Model_Right
{
protected $_rightID;
protected $_rightcategoryID;
+ protected $_shortcut;
protected $_title;
protected $_description;
@@ -62,6 +63,15 @@ class Application_Model_Right
{
$this->_rightID = $_rightcategoryID;
return $this;
+ }
+ public function getShortcut()
+ {
+ return $this->_shortcut;
+ }
+ public function setShortcut($_shortcut)
+ {
+ $this->_shortcut = $_shortcut;
+ return $this;
}
public function getTitle()
{
diff --git a/application/models/RightMapper.php b/application/models/RightMapper.php
index 023e223..d59f518 100644
--- a/application/models/RightMapper.php
+++ b/application/models/RightMapper.php
@@ -47,7 +47,11 @@ class Application_Model_RightMapper
public function save(Application_Model_Right $right)
{
- $data = array('rightID'=> $right->getID() ,'title'=> $right->getTitle() ,'description'=> $right->getDescription() );
+ $data = array('rightID'=> $right->getID(),
+ 'rightcategoryID'=> $right->getRightcategoryID(),
+ 'shortcut'=>$right->getShortcut(),
+ 'title'=> $right->getTitle() ,
+ 'description'=> $right->getDescription() );
if (null === ($id = $right->getID()) ) {
unset($data['rightID']);
@@ -76,7 +80,11 @@ class Application_Model_RightMapper
$row = $result->current();
$right = new Application_Model_Right();
- $right->setID($row->rightID)->setTitle($row->title)->setDescription($row->description);
+ $right->setID($row->rightID)
+ ->setRightcategoryID($row->rightcategoryID)
+ ->setShortcut($row->shortcut)
+ ->setTitle($row->title)
+ ->setDescription($row->description);
return $right;
}
@@ -87,7 +95,11 @@ class Application_Model_RightMapper
foreach ($resultSet as $row) {
$entry = new Application_Model_Right();
- $entry->setID($row->rightID)->setTitle($row->title)->setDescription($row->description);
+ $entry->setID($row->rightID)
+ ->setRightcategoryID($row->rightcategoryID)
+ ->setShortcut($row->shortcut)
+ ->setTitle($row->title)
+ ->setDescription($row->description);
$entries[] = $entry;
}
diff --git a/pbs.sql b/pbs.sql
index fb03ab6..38fb8f6 100644
--- a/pbs.sql
+++ b/pbs.sql
@@ -18,6 +18,7 @@ CREATE TABLE IF NOT EXISTS `pbs_rightcategory` (
CREATE TABLE IF NOT EXISTS `pbs_right` (
`rightID` int(11) NOT NULL AUTO_INCREMENT,
`rightcategoryID` int(11) NOT NULL,
+ `shortcut` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
`title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`rightID`),
@@ -361,190 +362,190 @@ INSERT INTO `pbs_rightcategory` (`rightcategoryID`, `title`) VALUES
INSERT INTO `pbs`.`pbs_right` (`rightID`, `rightcategoryID`, `title`, `description`) VALUES
-- Person
-- Eigene Personendetails ändern
-(NULL, '1', 'Edit own profiledetails', NULL),
+(NULL, '1', '', 'Edit own profiledetails', NULL),
-- Eigene Personendetails anzeigen
-(NULL, '1', 'Show own profiledetails', NULL),
+(NULL, '1', '', 'Show own profiledetails', NULL),
-- Eigene Identität vom System löschen
-(NULL, '1', 'Delete own account', NULL),
+(NULL, '1', '', 'Delete own account', NULL),
-- Person löschen
-(NULL, '1', 'Delete account of other', NULL),
+(NULL, '1', '', 'Delete account of other', NULL),
-- Personendetails anderer anzeigen
-(NULL, '1', 'Show other profiledetails', NULL),
+(NULL, '1', '', 'Show other profiledetails', NULL),
-- Personendetails anderer ändern
-(NULL, '1', 'Edit account from other', NULL),
+(NULL, '1', '', 'Edit account from other', NULL),
-- Person sperren
-(NULL, '1', 'Suspend account', NULL),
+(NULL, '1', '', 'Suspend account', NULL),
-- Gruppen
-- Gruppenübersicht anzeigen
-(NULL, '2', 'Show overview of group', NULL),
+(NULL, '2', '', 'Show overview of group', NULL),
-- Gruppendetails der eigenen Gruppe anzeigen
-(NULL, '2', 'Show details of own group', NULL),
+(NULL, '2', '', 'Show details of own group', NULL),
-- Gruppendetails anderer Gruppen anzeigen
-(NULL, '2', 'Show details of other group', NULL),
+(NULL, '2', '', 'Show details of other group', NULL),
-- Mitglieder einer Gruppe Anzeigen
-(NULL, '2', 'Show members of group', NULL),
+(NULL, '2', '', 'Show members of group', NULL),
-- Gruppe erstellen
-(NULL, '2', 'Create group', NULL),
+(NULL, '2', '', 'Create group', NULL),
-- Gruppe löschen
-(NULL, '2', 'Delete group', NULL),
+(NULL, '2', '', 'Delete group', NULL),
-- Gruppe mit allen Untergruppen löschen
-(NULL, '2', 'Delete group with all child groups', NULL),
+(NULL, '2', '', 'Delete group with all child groups', NULL),
-- Gruppenanfragen stellen
-(NULL, '2', 'Request membership', NULL),
+(NULL, '2', '', 'Request membership', NULL),
-- Gruppenanfragen akzeptieren
-(NULL, '2', 'Accect membership request', NULL),
+(NULL, '2', '', 'Accect membership request', NULL),
-- Gruppenanfragen ablehnen
-(NULL, '2', 'Decline membership request', NULL),
+(NULL, '2', '', 'Decline membership request', NULL),
-- Mitgliedschaften aus eigenen Gruppen entfernen
-(NULL, '2', 'Delete membership in own group', NULL),
+(NULL, '2', '', 'Delete membership in own group', NULL),
-- Mitgliedschaften aus anderen Gruppen entfernen
-(NULL, '2', 'Delete membership in other group', NULL),
+(NULL, '2', '', 'Delete membership in other group', NULL),
-- Gruppenmitgliedschaft sperren
-(NULL, '2', 'Suspend membership', NULL),
+(NULL, '2', '', 'Suspend membership', NULL),
-- Rollen
-- Neue Rollen anlegen
-(NULL, '3', 'Add role', NULL),
+(NULL, '3', '', 'Add role', NULL),
-- Rollen anzeigen
-(NULL, '3', 'Display details of role', NULL),
+(NULL, '3', '', 'Display details of role', NULL),
-- Rollen löschen
-(NULL, '3', 'Delete role', NULL),
+(NULL, '3', '', 'Delete role', NULL),
-- Rollen von Personen ändern
-(NULL, '3', 'Change role of membership', NULL),
+(NULL, '3', '', 'Change role of membership', NULL),
-- Recht zu Rolle hinzufügen
-(NULL, '3', 'Add right to role', NULL),
+(NULL, '3', '', 'Add right to role', NULL),
-- Recht von Rolle löschen
-(NULL, '3', 'Remove right of role', NULL),
+(NULL, '3', '', 'Remove right of role', NULL),
-- Rolle vererbbar machen
-(NULL, '3', 'Inherit role', NULL),
+(NULL, '3', '', 'Inherit role', NULL),
-- BootMedien
-- BootMedien Admin-Übersicht anzeigen
-(NULL, '4', 'Show admin interface of BootMedia', NULL),
+(NULL, '4', '', 'Show admin interface of BootMedia', NULL),
-- BootMedien User-Übersicht anzeigen
-(NULL, '4', 'Show user interface of BootMedia', NULL),
+(NULL, '4', '', 'Show user interface of BootMedia', NULL),
-- BootMedien anlegen
-(NULL, '4', 'Create new BootMedia', NULL),
+(NULL, '4', '', 'Create new BootMedia', NULL),
-- BootMedien editieren
-(NULL, '4', 'Edit BootMedia', NULL),
+(NULL, '4', '', 'Edit BootMedia', NULL),
-- BootMedien löschen
-(NULL, '4', 'Delete BootMedia', NULL),
+(NULL, '4', '', 'Delete BootMedia', NULL),
-- BootMedien herunterladen
-(NULL, '4', 'Download BootMedia', NULL),
+(NULL, '4', '', 'Download BootMedia', NULL),
-- BootMedien-Metadata (Description, Title) ändern
-(NULL, '4', 'Edit metadata (Description, Title) of a BootMedia', NULL),
+(NULL, '4', '', 'Edit metadata (Description, Title) of a BootMedia', NULL),
-- Preboot
-- Preboot übersicht anzeigen
-(NULL, '5', 'Show overview of preboots', NULL),
+(NULL, '5', '', 'Show overview of preboots', NULL),
-- Preboot anlegen
-(NULL, '5', 'Create preboot', NULL),
+(NULL, '5', '', 'Create preboot', NULL),
-- Preboot editieren
-(NULL, '5', 'Edit preboot', NULL),
+(NULL, '5', '', 'Edit preboot', NULL),
-- Preboot löschen
-(NULL, '5', 'Delete preboot', NULL),
+(NULL, '5', '', 'Delete preboot', NULL),
-- Preboot updaten
-(NULL, '5', 'Update preboot', NULL),
+(NULL, '5', '', 'Update preboot', NULL),
-- Preboot-Metadata (Description, Title) ändern
-(NULL, '5', 'Edit metadata (Description, Title) of a preboot', NULL),
+(NULL, '5', '', 'Edit metadata (Description, Title) of a preboot', NULL),
-- Config
-- Config Admin-Übersicht anzeigen
-(NULL, '6', 'Show admin overview of config', NULL),
+(NULL, '6', '', 'Show admin overview of config', NULL),
-- Config User-Übersicht anzeigen
-(NULL, '6', 'Show user overview of config', NULL),
+(NULL, '6', '', 'Show user overview of config', NULL),
-- Config anlegen
-(NULL, '6', 'Create config', NULL),
+(NULL, '6', '', 'Create config', NULL),
-- Config editieren
-(NULL, '6', 'Edit config', NULL),
+(NULL, '6', '', 'Edit config', NULL),
-- Config löschen
-(NULL, '6', 'Delete config', NULL),
+(NULL, '6', '', 'Delete config', NULL),
-- Config updaten
-(NULL, '6', 'Update config', NULL),
+(NULL, '6', '', 'Update config', NULL),
-- Config-Metadata (Description, Title) ändern
-(NULL, '6', 'Edit metadata (Description, Title) of config', NULL),
+(NULL, '6', '', 'Edit metadata (Description, Title) of config', NULL),
-- BootOs
-- BootOs anlegen
-(NULL, '7', 'Create BootOs', NULL),
+(NULL, '7', '', 'Create BootOs', NULL),
-- BootOS Admin-Übersicht anzeigen
-(NULL, '7', 'Show admin interface of BootOs', NULL),
+(NULL, '7', '', 'Show admin interface of BootOs', NULL),
-- BootOs User-Übersicht anzeigen
-(NULL, '7', 'Show user interface of BootOs', NULL),
+(NULL, '7', '', 'Show user interface of BootOs', NULL),
-- BootOs editieren
-(NULL, '7', 'Edit BootOs', NULL),
+(NULL, '7', '', 'Edit BootOs', NULL),
-- BootOs löschen
-(NULL, '7', 'Delete BootOs', NULL),
+(NULL, '7', '', 'Delete BootOs', NULL),
-- BootOs updaten
-(NULL, '7', 'Update BootOs', NULL),
+(NULL, '7', '', 'Update BootOs', NULL),
-- BootOs-Metadata (Description, Title) ändern
-(NULL, '7', 'Edit metadata (Description, Title) of config', NULL),
+(NULL, '7', '', 'Edit metadata (Description, Title) of config', NULL),
-- BootMenu
-- BootMenu Admin-Übersicht anzeigen
-(NULL, '8', 'Show admin interface of BootMenu', NULL),
+(NULL, '8', '', 'Show admin interface of BootMenu', NULL),
-- User-BootMenu anzeigen
-(NULL, '8', 'Show user interface of BootMenu', NULL),
+(NULL, '8', '', 'Show user interface of BootMenu', NULL),
-- BootMenu anlegen
-(NULL, '8', 'Create BootMenu', NULL),
+(NULL, '8', '', 'Create BootMenu', NULL),
-- BootMenu löschen
-(NULL, '8', 'Delete BootMenu', NULL),
+(NULL, '8', '', 'Delete BootMenu', NULL),
-- Bootmenu editieren
-(NULL, '8', 'Edit BootMenu', NULL),
+(NULL, '8', '', 'Edit BootMenu', NULL),
-- BootmenuEintrag löschen
-(NULL, '8', 'Delete entry of BootMenu', NULL),
+(NULL, '8', '', 'Delete entry of BootMenu', NULL),
-- BootmenuEintrag hinzufügen
-(NULL, '8', 'Add entry to a BootMenu', NULL),
+(NULL, '8', '', 'Add entry to a BootMenu', NULL),
-- BootmenuEintrag editieren
-(NULL, '8', 'Edit an entry of a BootMenu', NULL),
+(NULL, '8', '', 'Edit an entry of a BootMenu', NULL),
-- BootmenuEintrag-Metadata (Description, Title) ändern
-(NULL, '8', 'Edit metadata (Description, Title) of an entry of a BootMenu', NULL),
+(NULL, '8', '', 'Edit metadata (Description, Title) of an entry of a BootMenu', NULL),
-- Client
-- Client Übersicht ansehen
-(NULL, '9', 'Show overview of Clients', NULL),
+(NULL, '9', '', 'Show overview of Clients', NULL),
-- Clients manuell anlegen
-(NULL, '9', 'Add new Clients', NULL),
+(NULL, '9', '', 'Add new Clients', NULL),
-- Clients bearbeiten
-(NULL, '9', 'Edit Clients', NULL),
+(NULL, '9', '', 'Edit Clients', NULL),
-- Clients löschen
-(NULL, '9', 'Delete Clients', NULL),
+(NULL, '9', '', 'Delete Clients', NULL),
-- Pool
-- Pool Übersicht anzeigen
-(NULL, '10', 'Show overview of Pool', NULL),
+(NULL, '10', '', 'Show overview of Pool', NULL),
-- Pools anlegen
-(NULL, '10', 'Create new Pool', NULL),
+(NULL, '10', '', 'Create new Pool', NULL),
-- Pools bearbeiten
-(NULL, '10', 'Edit Pool', NULL),
+(NULL, '10', '', 'Edit Pool', NULL),
-- Pools löschen
-(NULL, '10', 'Delete Pool', NULL),
+(NULL, '10', '', 'Delete Pool', NULL),
-- Clients aus Pool entfernen
-(NULL, '10', 'Unlink client to pool', NULL),
+(NULL, '10', '', 'Unlink client to pool', NULL),
-- Clients zu Pool hinzufügen
-(NULL, '10', 'Link client to pool', NULL),
+(NULL, '10', '', 'Link client to pool', NULL),
-- Übersicht an nicht zugewiesene Clients anzeigen
-(NULL, '10', 'Show unlinked Clients', NULL),
+(NULL, '10', '', 'Show unlinked Clients', NULL),
-- Filter
-- Filter Übersicht ansehen
-(NULL, '11', 'Show overview of Pool', NULL),
+(NULL, '11', '', 'Show overview of Pool', NULL),
-- Filter anlegen
-(NULL, '11', 'Create new Filter', NULL),
+(NULL, '11', '', 'Create new Filter', NULL),
-- Filter bearbeiten
-(NULL, '11', 'Edit Filter', NULL),
+(NULL, '11', '', 'Edit Filter', NULL),
-- Filterpriorität ändern
-(NULL, '11', 'Edit Filterpriority', NULL),
+(NULL, '11', '', 'Edit Filterpriority', NULL),
-- Filter löschen
-(NULL, '11', 'Delete Filter', NULL),
+(NULL, '11', '', 'Delete Filter', NULL),
-- FilterEinträge hinzufügen
-(NULL, '11', 'Add additional Filterentry to a Filter', NULL),
+(NULL, '11', '', 'Add additional Filterentry to a Filter', NULL),
-- FilterEinträge editieren
-(NULL, '11', 'Edit Filterentry of a Filter', NULL),
+(NULL, '11', '', 'Edit Filterentry of a Filter', NULL),
-- FilterEinträge löschen
-(NULL, '11', 'Delete Filterentry of a Filter', NULL);
+(NULL, '11', '', 'Delete Filterentry of a Filter', NULL);