Универсальная база знаний LMS Wisdom System Wisdom Tree MAIN My Profile

Inside2 Access System

by #Alex Torrison
Config:

access_system = 'true'
access_user_id_column = ''
access_user_work_group = ''

access_input
Для Группы: Edit / View (IF ($int[1])) checked
Для Всех: Edit / View

===============

https://docs.google.com/document/d/1OZYBXFW5x1PIKV1Xmxmq9Y56l7WXpl4YAv_dhe95HAU/edit?usp=sharing

===============

$user_in_work_group = $this->ion_auth->in_group($config['access_user_work_group']);

>>> Scope (SELECT all FROM TABLE)

WHERE ...

$access_where = AND (ar_all_view = 1
if ($user_in_work_group) $access_where .= "OR (ar_group_view = 1 )";
$access_where .= ")"

===============

>>> IN SELECT .... LIMIT 1 (ROW) in Edit Form USE Access FILTER !!!

===============

ADD only for users in Workgroup

===============

Edit / Delete

$edit = false;
SELECT FROM .... WHERE id =

if (ar_all_edit) == 1 $edit = true;
if ($user_in_work_group) {
if (ar_group_edit) == 1 $edit = true;
}
if ($edit) {...}

===============

IF NO ACCESS:

"Access Denied!" die();

Этот объект часть других / Parent