Closed (outdated)
Project:
Role Delegation
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
15 Feb 2011 at 00:26 UTC
Updated:
10 Mar 2016 at 13:52 UTC
Jump to comment: Most recent
Comments
Comment #1
Andrew Schulman commentedwyattbiker, I'm thinking on this one but it's going to be hard to reproduce and debug. I've never used Ubercart, and I'm not familiar with whatever module you're using to allow people to purchase roles. I guess it's a custom module.
Probably the best I can do is to propose some patches and see if they fix the problem. I'll get to it as soon as I can.
Comment #2
wyattbiker commentedI am not sure if the module is custom of the Ubercart. Basically it's part of the Features assignment to the product, to assign Roles once they buy a product.
So here is an example when I assign a feature to a product:
Role assignment SKU: PPROMO-N
Role: Promotional Shopkeeper
Expiration: Tue, 02/15/2011 - 00:00
Shippable: No
Multiply by quantity: No
So anytime someone purchases the SKU PPROMO-N they get the Promotional Shopkeeper.
Maybe the solution would be to have your module detect the source of the assignment. In other words, somehow your module checks the the role of the user and if its not one of the delegation roles it does nothing.
Thanks
Comment #3
wyattbiker commentedHere is a link I found. Maybe it's helpful.
http://www.ubercart.org/forum/support/3670/role_assignment_not_happening...
Comment #4
Andrew Schulman commentedOK, thanks. Since I've never used Ubercart, I didn't know that it comes with a uc_roles module. That helps. I'll look at it as soon as I can.
Comment #5
j0nathan commentedSubscribing.
Comment #6
Andrew Schulman commentedSo the failure works like this:
An ordinary authenticated user buys the Promotional Shopkeeper role. uc_roles tries to assign the role. But, Role Delegation intercepts the assignment and blocks it.
There's a genuine conflict here between Role Delegation and Ubercart or other modules that want to allow an ordinary user to assign a role to him or herself. When the user buys that role, UC allows him or her to assign a role to him or herself. Role Delegation doesn't allow that, unless the "assign X role" permission has been granted to all authenticated users.
So I agree that the problem is for Role Delegation to reliably figure out where the source of the role assignment request came from. If it came from Role Delegation, then it can allow or block it. If it came from another module, it should step out of the way.
Comment #7
benjy commentedDrupal 6 support has now been dropped.