Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- actionReadGroup($id) {
- if (!Yii::app()->user->checkAccess('readGroup', array(
- 'groupId' => $id,
- ))) {
- throw new
- };
- }
- // БИЗНЕС ПРАВИЛО:
- (bool) Yii::app()->db->createCommand("SELECT ...",)
- ->queryScalar(array(
- 'grp' => $params['groupId'],
- 'user' => $params['userId'],
- 'someData' => $data['foo'],
- ));
- $rule = new ReadGroupRule($params, $data); $rule->check();
- ReadGroupRule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement