[Fusionforge-general] populating nss_usergroups manually

Sylvain Beucler - Inria sylvain.beucler at inria.fr
Tue May 13 11:58:15 CEST 2014


Hi,

Le 12/05/2014 23:53, Seth Galitzer a écrit :
> I am working out a migration path from GFAS->FF and at this point I
> think I have most things covered. I started with Roland Mas' script from
> a couple of years back and have made changes that I think have gotten
> most of the critical data imported to where at least it can be massaged
> to completion.
>
> One of the last things to work out is unix filesystem permissions for
> SCM groups/users. I was able to populate nss_users from the GFAS data
> during the original import, but not nss_usergroups, as I think this
> needs to happen after running normalize_roles.php, which needs to happen
> after the migration script is complete.
>
> Attached is what I think should work. I have not tested it yet, but
> wanted to see if it was a sane attempt, or if there might be a better
> way to deal with it. The general algorithm is to get the set of
> group_ids for groups that have SCM enabled, get the set of user_ids for
> members of that group, and then add them to nss_usergroups. In my case,
> all members of the group should have write access to the SCM, if that
> plugin is enabled at all, so I am not doing any checking if the user
> should have that permission or not.
>
> I based the frame of this on the normalize_roles.php script, and left
> the plugin setup code in there as I didn't know if it was necessary or
> not. I also wasn't sure what class references might be necessary, so I
> included everything I thought was needed.
>
> So please tell me if this should work, or if it's ridiculous, or if
> there is a better and cleaner way to accomplish my goal. Any and all
> criticism/improvements are welcome. I'll be happy to answer any
> questions for clarification.

At first glance:
- you seem to only check role_projects_ref, so you're only checking the 
external/linked roles, and missing the project roles
- let us know about the perfs :)

-- 
Sylvain



More information about the Fusionforge-general mailing list