Skip to content

Commit

Permalink
v2
Browse files Browse the repository at this point in the history
  • Loading branch information
nenad-zivkovic committed Nov 27, 2014
1 parent 58774a9 commit d4a3bcc
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 16 deletions.
4 changes: 1 addition & 3 deletions _protected/backend/controllers/BackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
* BackendController extends Controller and implements the behaviors() method
* where you can specify the access control ( AC filter + RBAC) for
* your controllers and their actions.
*
* @package backend\controllers
*/
class BackendController extends Controller
{
Expand All @@ -29,7 +27,7 @@ public function behaviors()
'rules' => [
[
'controllers' => ['user'],
'actions' => ['index', 'view', 'create', 'update', 'delete', 'update-role'],
'actions' => ['index', 'view', 'create', 'update', 'delete'],
'allow' => true,
'roles' => ['@'],
'matchCallback' => function ($rule, $action) {
Expand Down
2 changes: 0 additions & 2 deletions _protected/backend/controllers/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
/**
* Site controller.
* It is responsible for displaying static pages, and logging users in and out.
*
* @package backend\controllers
*/
class SiteController extends Controller
{
Expand Down
4 changes: 1 addition & 3 deletions _protected/backend/controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

/**
* UserController implements the CRUD actions for User model.
*
* @package backend\controllers
*/
class UserController extends BackendController
{
Expand Down Expand Up @@ -90,7 +88,7 @@ public function actionCreate()
*
* @throws NotFoundHttpException
*/
public function actionUpdate($id)
public function actionUpdate($id)
{
// get role
$role = Role::findOne(['user_id' => $id]);
Expand Down
2 changes: 0 additions & 2 deletions _protected/backend/helpers/CssHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

/**
* Css helper class.
*
* @package backend\helpers
*/
class CssHelper
{
Expand Down
6 changes: 1 addition & 5 deletions _protected/common/rbac/helpers/RbacHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@
class RbacHelper
{
/**
* =========================================================================
* Assigns the appropriate role to the registered user.
* If this is the first registered user in our system, he will get the
* If this is the first registered user in our system, he will get the
* theCreator role (this should be you), if not, he will get the member role.
* =========================================================================
*
* @param integer $id The id of the registered user.
*
* @return string Role name.
* _________________________________________________________________________
*/
public static function assignRole($id)
{
Expand Down
2 changes: 1 addition & 1 deletion _protected/common/rbac/models/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @property string $user_id
* @property integer $created_at
*
* @property User $username
* @property $username User
*/
class Role extends ActiveRecord
{
Expand Down

0 comments on commit d4a3bcc

Please sign in to comment.