Skip to content

Commit 7e7082a

Browse files
committed
Course browser added for non-admin user
1 parent e583e01 commit 7e7082a

File tree

6 files changed

+251
-12
lines changed

6 files changed

+251
-12
lines changed

protected/controllers/CourseController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function accessRules()
3333
),
3434
array('allow', // allow authenticated user to perform 'create' and 'update' actions
3535
'actions'=>array('create','update'),
36-
'users'=>array('@'),
36+
'users'=>array('admin'),
3737
),
3838
array('allow', // allow admin user to perform 'admin' and 'delete' actions
3939
'actions'=>array('admin','delete'),
@@ -144,6 +144,8 @@ public function actionAdmin()
144144
));
145145
}
146146

147+
148+
147149
/**
148150
* Returns the data model based on the primary key given in the GET variable.
149151
* If the data model is not found, an HTTP exception will be raised.
@@ -171,4 +173,6 @@ protected function performAjaxValidation($model)
171173
Yii::app()->end();
172174
}
173175
}
176+
177+
174178
}

0 commit comments

Comments
 (0)