Index: openacs-4/packages/courses/www/cc-admin/grant-user-list.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/courses/www/cc-admin/grant-user-list.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/courses/www/cc-admin/grant-user-list.xql 2 Feb 2005 23:02:36 -0000 1.1
+++ openacs-4/packages/courses/www/cc-admin/grant-user-list.xql 3 Feb 2005 22:41:28 -0000 1.2
@@ -4,31 +4,42 @@
select first_names, last_name, user_id as p_user_id
- from cc_users where user_id <> :user_id
+ from cc_users where email = ''
select first_names, last_name, user_id as p_user_id
- from cc_users where user_id <> :user_id and lower(first_names) like '%$user_name%'
- or lower(last_name) like '%$user_name%'
+ from cc_users where user_id <> :user_id
+ and (lower(first_names) like '%$user_name%'
+ or lower(last_name) like '%$user_name%') and user_id in (
+ select grantee_id from acs_permissions where privilege = 'create' and
+ object_id = :cc_package_id
+ ) order by first_names, last_name
select first_names, last_name, user_id as p_user_id
- from cc_users where user_id <> :user_id and lower(email) like '%$user_email%'
+ from cc_users where user_id <> :user_id
+ and lower(email) like '%$user_email%' and user_id in (
+ select grantee_id from acs_permissions where privilege = 'create' and
+ object_id = :cc_package_id
+ ) order by email
select first_names, last_name, user_id as p_user_id
- from cc_users where user_id <> :user_id and (
+ from cc_users where user_id <> :user_id
lower(first_names) like '%$user_name%' or lower(last_name) like '%$user_name%')
- and lower(email) like '%$user_email%'
+ and lower(email) like '%$user_email%' and user_id in (
+ select grantee_id from acs_permissions where privilege = 'create' and
+ object_id = :cc_package_id
+ ) order by email