mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Added permission basis/phrase to dump.sql
- The function getAuthUID() present in the helper fhcauth_helper.php now tries to work always with CI session to get the uid - REST_controller doesn't need anymore to handle the uid - FHC_Controller and FHC_Model load fhcauth_helper in their constructor, so any class that extends them now could call the function getAuthUID() anywhere in the code - The controllers don't need anymore to pass the uid to the models or to the libraries - Library FHC_DB_ACL load fhcauth_helper in its constructor and uses getAuthID()
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
if ( ! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Message_model extends DB_Model
|
||||
{
|
||||
@@ -20,7 +20,7 @@ class Message_model extends DB_Model
|
||||
// Check wrights
|
||||
// @ToDo: Define the special wright for reading own messages "basis/message:own"
|
||||
// if same user
|
||||
if ($uid === $this->getUID())
|
||||
if ($uid === getAuthUID())
|
||||
{
|
||||
if (! $this->fhc_db_acl->isBerechtigt('basis/message', 's'))
|
||||
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> basis/message', FHC_MODEL_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user