| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Gluchik 31.03.2005 20:03
1,2. Согласен, криво выразил мысль. getRightsToObject вычиляет эффективные права на объект на основе acl. Это понятно и совершенно логично.$current_object[^MAIN:pSQL.sql[table]{
SELECT
record_id AS id,
parent_id,
thread_id,
irf,
autor as auser_id,
text
FROM
threads
WHERE
record_id = '2'
}]
$thread[^MAIN:pSQL.sql[table]{
SELECT
record_id AS id,
parent_id,
irf,
autor as auser_id
FROM
threads
WHERE
thread_id = $current_object.thread_id
}]
$acl[^auth.getFullACL[$thread]]
<br />
---<br />
^$auth.user.user_id=$auth.user.user_id<br />
---<br />
--------- ^$current_object ---------<br />
^current_object.menu{
^$current_object.id=$current_object.id<br />
^$current_object.parent_id=$current_object.parent_id<br />
^$current_object.irf=$current_object.irf<br />
^$current_object.auser_id=$current_object.auser_id
}
<br /><br />
<br />
--------- ^$thread ---------<br />
^thread.menu{
^$thread.id=$thread.id<br />
^$thread.parent_id=$thread.parent_id<br />
^$thread.irf=$thread.irf<br />
^$thread.auser_id=$thread.auser_id
}
<br /><br />
Состоит в группах: ^auth.user.groups.menu{$auth.user.groups.name}[, ]<br />
$effective_right(^auth.getRightsToObject[$current_object;$thread;$acl])
^$effective_right=$effective_right <br />Получаем результат: