aspose file tools*
The moose likes JForum and the fly likes Users in Groups or memberships Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Users in Groups or memberships" Watch "Users in Groups or memberships" New topic
Author

Users in Groups or memberships

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
My users are organized into memberships. Each user has a membership ID and a user ID. User IDs are unique within a membership.

I have Jforum SSO working, so that my users get logged onto Jforum automatically. I would like for a user from one of my memberships to only see forums and topics for their own membership.

It will take some work, but Jforum user groups, membership/group specific forum names, and a lot of security permissions will probably work for this. I will try to map my memberships to Jforum user groups. Has anyone else had any experience with something like this?

A big problem will be duplicate user IDs or user names. I have seen some mention of having to take care of duplicates in this forum, but no solutions. Does anyone have any suggestions for handling duplicate user IDs or names? I could possible append my membership IDs to the user names in the background. Then, I could truncate the names when they display. Would this be difficult, like making me touch too much Jforum code?


Thanks,

Danny

[originally posted on jforum.net by dhhoyle]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I did something like this when I integrated my application with JForum. So it can be done. However, it's not a quick task.

Things you will need to look at are:

How tightly to integrate your app's "groups" with JForum's groups. Can it be a batch process or do you want to generate group membership automatically. In my case, I modified the various Group DAO objects to pull membership info from my apps groups (and disallowed changing group info via JForum).

How do you plan on managing your "security" issues? E.g., making sure the correct groups only have access to the specific forums. This is possible to do via the JForum admin screens, but you need to make sure anyone creating new forums knows the correct process. And it's very easy to miss a step and expose a forum to the wrong people this way.

In my case, I wrote my own forum creation code that automatically sets the correct rights based on some simple choices. The hardest part of doing this is understanding the underlying jForum security mechanisms (which required digging around in the code a lot). Also, there are some repository (classes that keep info in memory) that need to be considered.

Finally, as to duplicate user id's. We use a similar structure here for our id's. E.g., the "real id" is client.username. Our login process includes either manually or automatically selecting the client, having the user enter a user id and password, and then using javascript to concatenate the two into a hidden field that's used to authenticate them.

In JForum, we don't display the user id, instead the templates have been modified to display the from User object property (Full name) rather than the username property. Since we require a full name to access our main app, this gets around the user id problem and makes the look better because posts say: Jean Doe rather than jdoe.

One other thing to consider are things like the member listings. Do you want different groups to see each other? We "solved" this by simply removing the member listing links.

Bottom line is that it's all possible but it's on the order of a 1-4 week project (depending on how much you know about JForum/can decypher other people's code).

One final thing to think about: If you need total separation and have just a few groups, it might be easier to run multiple instances of JForum than to add in the security. (We didn't because we have many clients and client subgroups, with some overlap).
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I did something like this when I integrated my application with JForum. So it can be done. However, it's not a quick task.

Things you will need to look at are:

How tightly to integrate your app's "groups" with JForum's groups. Can it be a batch process or do you want to generate group membership automatically. In my case, I modified the various Group DAO objects to pull membership info from my apps groups (and disallowed changing group info via JForum).

How do you plan on managing your "security" issues? E.g., making sure the correct groups only have access to the specific forums. This is possible to do via the JForum admin screens, but you need to make sure anyone creating new forums knows the correct process. And it's very easy to miss a step and expose a forum to the wrong people this way.

In my case, I wrote my own forum creation code that automatically sets the correct rights based on some simple choices. The hardest part of doing this is understanding the underlying jForum security mechanisms (which required digging around in the code a lot). Also, there are some repository (classes that keep info in memory) that need to be considered.

Finally, as to duplicate user id's. We use a similar structure here for our id's. E.g., the "real id" is client.username. Our login process includes either manually or automatically selecting the client, having the user enter a user id and password, and then using javascript to concatenate the two into a hidden field that's used to authenticate them.

In JForum, we don't display the user id, instead the templates have been modified to display the from User object property (Full name) rather than the username property. Since we require a full name to access our main app, this gets around the user id problem and makes the look better because posts say: Jean Doe rather than jdoe.

One other thing to consider are things like the member listings. Do you want different groups to see each other? We "solved" this by simply removing the member listing links.

Bottom line is that it's all possible but it's on the order of a 1-4 week project (depending on how much you know about JForum/can decypher other people's code).

One final thing to think about: If you need total separation and have just a few groups, it might be easier to run multiple instances of JForum than to add in the security. (We didn't because we have many clients and client subgroups, with some overlap).
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Monroe,
Thanks very much for your reply. I intend to keep things simple at first, as you suggested. Though I can see that it is involved, your experience proves that groups and group security can handle my membership separations.

Your handling of duplicate user IDs is just what I need. For now, I want to keep groups separated, but I want to eventually give memberships the capability to share forums. Only then will I need to even show a membership list, and the membership ID as part of the name will make perfect sense.

If this is a 1 to 4 weeks project for you, it will take me at least twice as long. Wish me luck.
[originally posted on jforum.net by dhhoyle]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Users in Groups or memberships