Blame view

common/modules/comment/rbac/ArtboxCommentUpdateOwnRule.php 405 Bytes
e608c5f7   Yarik   Comment added
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  <?php
  
      namespace common\modules\comment\rbac;
  
      use yii\rbac\Rule;
  
      class ArtboxCommentUpdateOwnRule extends Rule
      {
  
          public $name = 'canCommentUpdateOwnArtbox';
  
          public function execute($user, $item, $params)
          {
              if($params['comment']->user_id == \Yii::$app->user->id) {
                  return true;
              }
              return false;
          }
  
3f2bc3d0   Administrator   first commit
20
      }