Make Virtuemart use User Groups instead of Shopper Groups - joomla2.5

By default, Virtuemart uses its internal shopper groups for doing things like assigning prices and restricting access to certain products.
The problem with this is that ONLY Virtuemart uses its own shopper groups, so if you have other extensions like RSMembership which change the normal Joomla user group of a user, Virtuemart has no idea.
So if someone buys a subscription in RSMembership, and you drop that user into a "Premium" usergroup, and you want Virtuemart to give them a price discount for being in that "Premium" user group, it doesn't appear to be possible since Virtuemart uses its own shopper groups, not the normal Joomla user group.
Is there a solution to this problem or some setting/modification to Virtuemart that makes it utilize the Joomla user groups, rather than its shopper groups?

Yes, there's a Joomla extension called Chameleon that allows you to trigger different shopper groups based on Joomla user groups. JED: http://extensions.joomla.org/extension/chameleon
You can set up a rule that says ‘Is user in "Premium" user group? If so, put them into "Premium" shopper group’, then set up another similar rule per group.
In this way, RSMembership or other user group components are able to control shopper groups.
The shopper group assignments are done on-the-fly. i.e. they are not added to the user's record in Joomla/VM, but VM treats the user as being in that shopper group, and does pricing/visibility etc accordingly.
Disclosure: I'm the developer of Chameleon.

Related

Can I specify a set of Django user groups to be exclusive of each other?

I have a Django app that uses the stock User and Group models. I have two groups, group A and group B. I would like to prevent any user from being in both group A and group B, being in just one group or the other is fine. what is the best way to go about this? I was looking into model validation but I would like to do this without modifying or sub classing the stock User model. It would even be enough for me to be able to check and make sure that this wasnt being set on the django admin edit user page.

Django user groups only for permissions?

I'm a bit unsure what to use Django user groups for.
I have an application where every user belongs to a different organisation. The organisations don't have anything to do with read/write permissions. It's just a way to separate groups of users. Every organisation needs some additional fields, like a name, URL, and email address. New organisations will be added to the system over time.
Within every organisation, users can have different permissions for moderation and administration, for which I (also) want to use user groups.
My question: Should I use Django's user groups to define the organisations, or should I just make an 'Organisation' model with a relation to the user?
Nope. User groups are made for different reasons. You CAN use them to define organisations but I think you should think bit further ahead:
will the organisation require more fields than just name?
perhaps you will need permissions in the future to define users roles within organisations?
I'm sure you can come up with more things to think of. But if you answered yes to one of those questions then just create your Organisation model.
1) You need to add group from django admin side under group table.
2) And while creating new user, assign specific group to user using user_obj.groups.add(group_id). Or Let user select group at frontend.
and then user_obj.save()
in Group table, you can create organization
OR
You can create individual organization table and assign assign user to specific organization.

ColdFusion 9 LDAP

In our intranet application, if a user is not authenticated, I use the CFNTAuthenticate tag.
But, normally the user is already authenticated and I'm able to retrieve his username with mid(cgi.REMOTE_USER, 8, 13). How can I retrieve his group memberships (or at least if he is member of a specific group) without having him to type his password (as he is already authenticated, single sign-on)?
I hope I was able to provide all required information for a simple answer from your side (in the hope there is a simple answer).
You can use any Active Directory account to retrieve group memberships for other users. I have a ColdFusion-specific domain account for looking up group information. That account doesn't need any special permissions in Active Directory.
Checking a direct group membership is simple. Use this as the LDAP query (<cfldap>):
(&(samAccountName=#userAccount#)(memberOf=#distinguishedNameOfGroup#))
If turns up empty the user is not member of that group.
Important: The values of userAccount and distinguishedNameOfGroup must be escaped before you can use them in a filter. See the Special Characters chart on the MSDN page that explains the search filter syntax.
Checking a nested group membership (i.e., user is in a subgroup of the group you want to check) is comparatively complicated.

Is there a Django application similar to Drupal's Organic Groups module?

Basically I am looking for the following:
Groups can be created by users of the site.
Users can apply to join a group.
Every group has a group administrator which can approve or reject applications to join a group. Also, they can remove members from a group.
Content can be created which is associated with the group. Only group members can create content. Users who are not group members can view this content but not create/modify the content.
Are there any Django applications which can help implement these requirements?
The only one that I'm aware of is part of the Pinax project. It doesn't meet all of these out of the box, but can be expanded pretty easily to get these features.

Django auth system: adding user to group via "invites"

I want to use the Django default auth system to manage users and groups. Is there an existing Django app/module that adds users to groups by invites? I.e. some existing user of the group sends an invite with a secret key in a URL, and another user that clicks on the URL joins the group.
I can write one, but figured I ask before doing that.
Thanks.
I am not sure if this will solve all your problems but do take a look at Pinax. They have features to support user invitation and user groups.