CESNET/perun — pull request #452 by stavamichal (2014-09-02 11:33:29+00:00)
Title: Preferred primary unix group names final

- new behavior of setting required attributes for member and resource
- new unixGID workflow (with preferredUnixGroupName-namespace:*)

------------------------------------------------------------------------------------------

NEED TO DO AFTER MERGE THIS PULL REQUEST:

1] CREATE NEW ATTR_DEFs:
- UF:def:basicDefaultGID (R: anyone, W: FACILITY)
- U:def:preferredUnixGroupName-namespace:*
(*=cerit,egi-ui,einfra,sitola,storage) (R: anyone, W: SELF)
- UF:virt:defaultUnixGID (R: anyone, W: FACILITY)
- UF:virt:preferredUnixGroupName (R: anyone, W:SELF)

2] COPY value in DB
- from def:defaultUnixGID (user_facility_attrs) to
def:basicDefaultGID
- use this sql:
"insert into user_facility_attr_values
(user_id, facility_id, attr_id, attr_value, created_at,
created_by, modified_at, modified_by, status, attr_value_text,
created_by_uid, modified_by_uid)
select user_id, facility_id, X as attr_id, attr_value,
created_at, created_by, modified_at, modified_by, status,
attr_value_text, created_by_uid, modified_by_uid
from user_facility_attr_values
where attr_id=Y"
- where X = id of UF:def:basicDefaultGID attr,
and Y = id of UF:def:defaultUnixGID attr

3] REMOVE attr value in DB
- for attr UF:def:defaultUnixGID by sql:
"delete from user_facility_attr_values where attr_id=X"
- where X = id of UF:def:defaultUnixGID attr

4] INCREASE DB-version

5] ADD THESE info to the changelog and dbchangelog