UniverseUniversity


Home Projects Jobs Clientele Contact

uu


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UU: Single-db-call philosophy



Added:

1) family of functions: umo_add_{student,editor,teacher,admin}
(umo_version_id, person_id)

     PERFORM umo_add_teacher( umo_id, person );
     PERFORM umo_add_editor( umo_id, person );

2) group_find_by_type(umo_version_id, group_type_name, auto_create)

     group_id = group_find_by_type( umo_id, 'Students', true );

3) group_list_members(group_id)

Should be enough for now.

2009/1/8 Alexey Parshin <alexeyp@gmail.com>

> We already have class_admin_group_id(), class_students_group_id(), and
> class_teachers_group_id().
> All of them return *default* group id.
> I can easily add class_admin_list(), class_students_list(), and
> class_teachers_list().
>
> As for 'at least' question. The ACL stores a bit combination for access
> values. When I say 'at least' meaning something like:
>
> .. (access & requered_access) = requered_access ..
>
>
> 2009/1/8 Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
>
>> Alexey Parshin wrote:
>> > 2009/1/8 Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
>> >
>> >
>> >> Err.. Group_find_for_object already exists and is fine as-is, I think.
>> >> And yes, I'm fine with bugging you about creating an extra two-line
>> >> procedure every now and then, if you think it's the right thing to do
>> :)
>> >>
>> >> I guess what I really need is umo_list_acl(umo_version_id, access_type)
>> >> returning recordset of PERSON.
>> >>
>> >
>> >
>> > Ok. Do you want any person that has *exactly* or *at least* that access?
>> > Also, since ACL isn't in parameters or results, may be it's
>> > umo_list_persons?
>> > I'm not sure which name sucks more :)
>> >
>> > Goes to my TODO list.
>> >
>> Well, given that our accesses are essentially set of flags, as opposed to
>> cumulative hierarchy, we don't really have "at least" concept.
>>
>> What I'm looking for: give me list of admins, give me list of editors...
>> etc.
>>
>> Then I'll need functions like umo_make_person_editor(version id, person
>> id)
>> to manage permissions.
>>
>>
>> --
>> Ilya A. Volynets-Evenbakh
>> http://www.total-knowledge.com
>>
>>
>
>
> --
> Alexey Parshin,
> http://www.sptk.net
>



-- 
Alexey Parshin,
http://www.sptk.net

Authoright © Total Knowledge: 2001-2008