mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
only displays profil update requests the uid has permissions for (mitarbeiter/stammdaten or student/stammdaten), also fixes bug and adds JSON.parse to get the value in the sessionStorage
This commit is contained in:
@@ -16,7 +16,7 @@ class Profil extends Auth_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['student/anrechnung_beantragen:r', 'user:r'], // TODO(chris): permissions?
|
||||
'index' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
'foto_sperre_function' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
'getView' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
'View' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
@@ -63,6 +63,16 @@ class Profil extends Auth_Controller
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function test(){
|
||||
|
||||
// Loads permission lib
|
||||
$this->load->library('PermissionLib');
|
||||
$mit_daten =$this->permissionlib->isBerechtigt('mitarbeiter/stammdaten','suid');
|
||||
var_dump($mit_daten);
|
||||
$stud_daten = $this->permissionlib->isBerechtigt('student/stammdaten','suid');
|
||||
var_dump($stud_daten);
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
@@ -149,12 +159,7 @@ class Profil extends Auth_Controller
|
||||
echo json_encode($res);
|
||||
}
|
||||
|
||||
public function test(){
|
||||
|
||||
// Loads permission lib
|
||||
$this->load->library('PermissionLib');
|
||||
var_dump($this->permissionlib->getOE_isEntitledFor());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user