To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / extra / svn / create_views.sql @ 441:cbce1fd3b1b7
History | View | Annotate | Download (631 Bytes)
| 1 |
/* ssh views */
|
|---|---|
| 2 |
|
| 3 |
CREATE OR REPLACE VIEW ssh_users as |
| 4 |
select login as username, hashed_password as password |
| 5 |
from users
|
| 6 |
where status = 1; |
| 7 |
|
| 8 |
|
| 9 |
/* nss views */
|
| 10 |
|
| 11 |
CREATE OR REPLACE VIEW nss_groups AS |
| 12 |
select identifier AS name, (id + 5000) AS gid, 'x' AS password |
| 13 |
from projects;
|
| 14 |
|
| 15 |
CREATE OR REPLACE VIEW nss_users AS |
| 16 |
select login AS username, CONCAT_WS(' ', firstname, lastname) as realname, (id + 5000) AS uid, 'x' AS password |
| 17 |
from users
|
| 18 |
where status = 1; |
| 19 |
|
| 20 |
CREATE OR REPLACE VIEW nss_grouplist AS |
| 21 |
select (members.project_id + 5000) AS gid, users.login AS username |
| 22 |
from users, members
|
| 23 |
where users.id = members.user_id
|
| 24 |
and users.status = 1; |