Просмотр файла vkclone-0.0.1/protected/data/accessrights.php

Размер файла: 3.02Kb
<?php
/**
 * Power hierarchy:
 * └─── administrator
 *      └─── major-moderator
 *           └─── forums-moderator
 *           └─── groups-moderator
 *           └─── publics-moderator
 *           └─── groups-moderator
 *
 * └─── user
 */
return array(
	// roles
	'roles' => array(
		'administrator' => array(
			'data' => array('color' => 'important'),
		),
		'major-moderator' => array(array('administrator'),
			'data' => array('color' => 'important'),
		),

		'forums-moderator' => array(array('major-moderator'),
			'data' => array('color' => 'important'),
		),
		'groups-moderator' => array(array('major-moderator'),
			'data' => array('color' => 'important'),
		),
		'publics-moderator' => array(array('major-moderator'),
			'data' => array('color' => 'important'),
		),
		'gallery-moderator' => array(array('major-moderator'),
			'data' => array('color' => 'important'),
		),

		// default roles
		'user' => array(
			'bizrule' => 'return !Yii::app()->user->isGuest;',
		),
		'author' => array(
			'bizrule' => 'return !Yii::app()->user->isGuest && $params["author"] == Yii::app()->user->record->id;',
		),
	),

	// tasks
	'tasks' => array(),

	// operations
	'operations' => array(
		'forums.forum.createForum' => array(array('forums-moderator')),
		'forums.forum.updateForum' => array(array('forums-moderator')),
		'forums.forum.deleteForum' => array(array('forums-moderator')),
		'forums.forum.orderForum' => array(array('forums-moderator')),
		'forums.section.createSection' => array(array('forums-moderator')),
		'forums.section.updateSection' => array(array('forums-moderator')),
		'forums.section.deleteSection' => array(array('forums-moderator')),
		'forums.topic.createTopic' => array(array('user')),
		'forums.topic.updateTopic' => array(array('forums-moderator')),
		'forums.topic.deleteTopic' => array(array('forums-moderator')),
		'forums.post.createPost' => array(array('user')),
		'forums.post.updatePost' => array(array('forums-moderator')),
		'forums.post.deletePost' => array(array('forums-moderator')),
		'forums.post.seeHistory' => array(array('forums-moderator')),

		'groups.group.updateGroup' => array(array('groups-moderator')),
		'groups.group.deleteGroup' => array(array('groups-moderator')),
		'groups.topic.updateTopic' => array(array('groups-moderator')),
		'groups.topic.deleteTopic' => array(array('groups-moderator')),
		'groups.post.updatePost' => array(array('groups-moderator')),
		'groups.post.deletePost' => array(array('groups-moderator')),
		'groups.member.purgeMember' => array(array('groups-moderator')),

		'publics.public.updatePublic' => array(array('publics-moderator')),
		'publics.public.deletePublic' => array(array('publics-moderator')),
		'publics.post.createPost' => array(array('publics-moderator')),
		'publics.post.updatePost' => array(array('publics-moderator')),
		'publics.post.deletePost' => array(array('publics-moderator')),

		'gallery.photo.updatePhoto' => array(array('gallery-moderator')),
		'gallery.photo.deletePhoto' => array(array('gallery-moderator')),
	),
);