Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
migrations
m120327_135311_rights_data.php
1
<?php
2
/**
3
* Gentics Portal.Node PHP
4
* Author & Copyright (c) by Gentics Software GmbH
5
* sales@gentics.com
6
* http://www.gentics.com
7
* Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8
* You must not use this software without a valid license agreement.
9
*/
10
class
m120327_135311_rights_data
extends
CDbMigration
11
{
12
public
function
up()
13
{
14
$this->execute(
"INSERT INTO `AuthItem` (`name`, `type`, `description`, `bizrule`, `data`) VALUES
15
('Authenticated', 1, 'Authenticated', NULL, 'N;'),
16
('commenting', 1, 'Commenting something', NULL, 'N;'),
17
('writeComment', 0, 'Write Comment', NULL, 'N;'),
18
('readComment', 0, 'Read Comment', NULL, 'N;'),
19
('deleteComment', 0, 'Delete Comment', NULL, 'N;'),
20
('manageComments', 1, 'Manage Comments', NULL, 'N;');"
);
21
22
$this->execute(
"INSERT INTO `AuthItemChild` (`parent`, `child`) VALUES
23
('Authenticated', 'commenting'),
24
('commenting', 'readComment'),
25
('commenting', 'writeComment'),
26
('manageComments', 'commenting'),
27
('manageComments', 'deleteComment')
28
"
);
29
}
30
31
public
function
down()
32
{
33
$this->
delete
(
'AuthItem'
,
"name in ('commenting', 'writeComment', 'readComment', 'deleteComment', 'manageComments')"
);
34
$this->
delete
(
'AuthItemChild'
,
"child in ('commenting', 'writeComment', 'readComment', 'deleteComment', 'manageComments')"
);
35
return
true
;
36
}
37
38
/*
39
// Use safeUp/safeDown to do migration with transaction
40
public function safeUp()
41
{
42
}
43
44
public function safeDown()
45
{
46
}
47
*/
48
}
Generated on Thu Feb 6 2014 15:47:54 for Gentics Portal.Node PHP API by
1.8.1.2