Database constants

Roles and permissions are publication specific. Hence, they cannot be created with the standard SQL scripts. You may do this through the Escenic Web Studio interface, but it is a lot faster to do this using SQL. Find your publication ID and create roles for it. In the example below, the publication ID is 1:

insert into GCE_Role (publicationId, name, description)
values (1, 'GUEST', 'Guest');

insert into GCE_Role (publicationId, name, description)
values (1, 'MEMBER', 'Member');

insert into GCE_Role (publicationId, name, description)
values (1, 'PARTNER', 'Partner');

insert into GCE_Role (publicationId, name, description)
values (1, 'MODERATOR', 'Moderator');

insert into GCE_Role (publicationId, name, description)
values (1, 'ADMIN', 'Administrator');

insert into GCE_Role (publicationId, name, description)
values (1, 'SECTION OWNER', 'Section Owner');

insert into GCE_Role (publicationId, name, description)
values (1, 'GROUP MEMBER', 'Group member');

insert into GCE_Role (publicationId, name, description)
values (1, 'GROUP MODERATOR', 'Group moderator');

insert into GCE_Role (publicationId, name, description)
values (1, 'GROUP OWNER', 'Group owner');

insert into GCE_IdGenerator values('roleId', 0);
insert into GCE_IdGenerator values('permissionId', 0);

update GCE_IdGenerator set value=(select max(roleId) + 1 from GCE_Role) where id='roleId';
update GCE_IdGenerator set value=((select max(permissionId) + 1 from GCE_Permission)) where id='permissionId';

For all permissions you need that is application dependent you may do the same, inserting values into the GCE_Permission table. These permissions are the ones used in your security publication resource file

For example, to add a permission called rate, you would do:

insert into GCE_Permission (publicationId, name, shortKey, description)
values (1, 'rate', 'rate', 'User may rate content');

You also have to run above two lines of update query