Page 1 of 1

select FEU users to see Listit2 items

Posted: Wed Mar 05, 2014 1:20 pm
by pedes
Hi everyone,

Maybe the title is not that clear...
I would like to use Listit2 to make a list of projects.
I also use FEU to let registered users log in.

All projects are just for logged in users, but some users can see project A, B and C others can see A, D and F, ect...

I would like to decide in the admin what user can see what project!
Is there a way to do this in Listit2 or do i need to make FEU groups for each project and then select the goup for that user that need this permission. If so how can i make auto a new FEU group when i create a new project and assign it to that created project.

Hope i'm clear enough... not easy to explain... :(

Anyone help me out and give me some idea

Kind regards and thank you very much
Peter

Re: select FEU users to see Listit2 items

Posted: Wed Mar 05, 2014 1:50 pm
by Jo Morg
With the given information I'd go with FEU groups. It seems appropriate for what you want. You may want to check CustomContents module in addition as it may provide a bit more control over what each group may access/see.

Re: select FEU users to see Listit2 items

Posted: Wed Mar 05, 2014 2:30 pm
by JohnnyB
If so how can i make auto a new FEU group when i create a new project and assign it to that created project.
Most of that will need to be done manually in your templates. Using CustomContent, you would do some logic that says, "if user belongs to Group A, show this..." ; "if user belongs to Group B, show this...."

The Custom Content module help section has the tags needed to build the logic.

To make a new FEU group when a new Project is created using your Listit2 instance, would require some PHP in a User Defined Tag. You can a new FEU group created automatically when a new project is created using the an event (Event Manager under Extensions).

Re: select FEU users to see Listit2 items

Posted: Thu Mar 06, 2014 12:44 am
by Stikki
Yep, i would take group approach as well.

Tho i would make new LI field that lists FEU grps.

Then when adding new LI item, you would define what FEU group(s) can see it.

and then when you have FEU user i would just list all LI items for that group by using {ListIt2Instance search_<feufield_alias>=$feu_user->UserGroup()}

Or something like that. But good start point is making that field first, there is no existing ones currently, only one that comes with XDefs and it only lists user ID's

Re: select FEU users to see Listit2 items

Posted: Mon Mar 10, 2014 6:10 am
by pedes
thank you all for the information.

I do not understand how to create an FEU group automatique when creating the item (project) in Listit2. For example the group can have the alias from the created Listit2 iten (project), there is no need to make a new field i think?

Thanks for your input
Kind regards
Peter

Re: select FEU users to see Listit2 items

Posted: Mon Mar 10, 2014 10:17 am
by Stikki
Well... You can make UDT that creates FEU grp with FEU PHP API.

And tie this UDT to one of LI event, PostItemSave sounds good in this case.

Re: select FEU users to see Listit2 items

Posted: Tue Mar 11, 2014 12:20 am
by pedes
thank you for your reply...

is there some topic where I can get an example for that UDT?
or can you point me in the right direction please.

I'm a designer not that good coder...

Thank you very much for your input.
Kind regards
Peter