annotate extra/svn/create_views.sql @ 69:dc22c3eb3c81 luisf

Feature #35: - Does not show the label "My Projects" if the user does not have any projects. - If the user is not signed in only shows the default Projects list.
author luisf
date Mon, 06 Dec 2010 18:12:52 +0000
parents 513646585e45
children
rev   line source
Chris@0 1 /* ssh views */
Chris@0 2
Chris@0 3 CREATE OR REPLACE VIEW ssh_users as
Chris@0 4 select login as username, hashed_password as password
Chris@0 5 from users
Chris@0 6 where status = 1;
Chris@0 7
Chris@0 8
Chris@0 9 /* nss views */
Chris@0 10
Chris@0 11 CREATE OR REPLACE VIEW nss_groups AS
Chris@0 12 select identifier AS name, (id + 5000) AS gid, 'x' AS password
Chris@0 13 from projects;
Chris@0 14
Chris@0 15 CREATE OR REPLACE VIEW nss_users AS
Chris@0 16 select login AS username, CONCAT_WS(' ', firstname, lastname) as realname, (id + 5000) AS uid, 'x' AS password
Chris@0 17 from users
Chris@0 18 where status = 1;
Chris@0 19
Chris@0 20 CREATE OR REPLACE VIEW nss_grouplist AS
Chris@0 21 select (members.project_id + 5000) AS gid, users.login AS username
Chris@0 22 from users, members
Chris@0 23 where users.id = members.user_id
Chris@0 24 and users.status = 1;