Closed (fixed)
Project:
Subuser
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2012 at 14:14 UTC
Updated:
29 Mar 2014 at 13:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
7wonders commentedAttached is a 5in1 patch that applies the following:
http://drupal.org/files/missing-plugin-1474838.patch
http://drupal.org/files/subuser-view-edit-delete-1213566-5.patch
http://drupal.org/files/subuser-loadall-1256938-2.patch
http://drupal.org/files/issues/subuser-relation-save.patch
http://drupal.org/files/issues/subuser-relation_predicate_renamed-124193...
This seems to work with the latest relation dev release except for editing the created subuser's.
Patch and zipped up module attached, feel free to try at your own risk.
Comment #2
7wonders commentedThe problems which exist when using together with the latest relation dev release that I can see are:
Comment #3
7wonders commentedThe attached patch doesnt really make any changes to the module (apart from including the 5 above patches) except for the default view which due to some permission errors wont show links to subusers unless you have view user profiles permission on. To get around this I added manual links. I also added an extra filter to the view that prevents you seeing other peoples subusers. This patch works with latest dev of relation in nearly every aspect from my point of view. Personally I would reccomend cloning the default view and making changes to it as you see fit and disabling the default one.
Comment #4
7wonders commentedIf you already have subuser installed and uninstall it before using the above patch, you might find that there are some issues with enabling the view. The solution is to just edit the view and then save. It should work fine on a fresh install though.
Comment #5
7wonders commentedAttached is a functioning version of subuser with some extra permissions added and a working view (however views_php is required for the view to function so it is added as a dependency).
Comment #6
franzkewd commentedThanks 7wonders. I hope the maintainer would promote this as a new base for 7.2.dev so it will get exposed for more testings.
Comment #7
marcusx commentedYou should use #1204692: Change default views to reflect upstream changes to VBO + relation instead of #1474838: user/%/subuser page could not be found as VBO is not a style anymore.
Comment #8
NobuT commentedUsing #5 zip file, I can make a parent user to create subusers. But I can't make the same parent user to edit the subusers. I suspect that there's a problem in my Views field (User: Edit link (Operations)). Would someone tell me what it should look like?
Because Views_php is a required module, I wonder where and how it is used for Subuser module. There must be something wrong like my Views setting is messed up or Relation is not properly set up.
Thanks,
Comment #9
marcusx commentedIn the original module views_php is not an dependency. I think 7wonders has added it for its own project. You can checkout a working version from my sandbox.
http://drupal.org/sandbox/marcusx/1637302
The version there has all necessary patches and is working ok in my current project. The project is still in development but I will fix problems on the way if they show up.
Comment #10
boombatower commentedI plan on taking a look at all this when I am home in a few hours. Looking at #9 there is only one patch referenced in the one commit made. Is that correct? You mentioned "all the patches" which is why I was unsure.
From #5 it sounds like there is some issue with the view? That can only be solved with a custom php filter/sort?
Reading all the way up it looks like #1 is the hitlist? I will start there.
Do we have anyone who is interested in becoming a co-maintainer as it is obvious myself and the other do no have the time?
Comment #11
boombatower commentedGot through the following, with a number of cleanups and changes to patches.
- #1241934: Relation API has changed so subuser install is broken
- Converted relation type defintion to use exportables API
- Made relation type unique
- #1208314: Relation is never saved
- #1256938: subuser_load_all not returning the proper parent user ids and not returning userids if we have defined another relation
Accounts for the last 3 patches in your list of 5 that you applied.
Hopefully, get through some more soon. Thanks everyone for contributions.
NOTE: Looks like relation_load() fails if you pass a vid so load_all() fails since it calls that.
Comment #12
marcusx commented@boombatower: Mmm let me check tonight, maybe I haven't pushed the stuff. But there were not all the patches neccessary to make it work, as far I can remember.
Comment #13
phiscock commentedIs there any chance of a new dev release soon. I am very keen to use this module if a working version were available.
Comment #14
7wonders commented@boombatower - any movement on this? I have a version working for my own needs but would much rather swap it out for a community supported version. Perhaps you could push the work you have so far as an unsupported dev release so we can help out??
Comment #15
7wonders commentedStrangely enough subuser_load_all works with admin and not auth user (after removing the use of vid as you mentioned already boombatower). I believe its something related to the use of global $user.
Comment #16
7wonders commentedHere is a fully working version of subuser. This works great on a clean install of drupal with only the dependencies and related modules installed. Works without the need to use administer user permissions or view user profiles permissions.
I have made only some small changes:
*Applied previous patches
*Split the permissions into view, edit and delete.
*Functioning view out of the box (no added dependencies).
One thing I did notice which was weird, is that it seemed to not save the permissions page when I added view, edit, delete to a user role. Saving the page again worked though.
I havent touched the switch user module and dont know if it works or not.
Comment #17
boombatower commentedI already pushed everything that I mentioned.
Comment #18
7wonders commentedSorry boombatower! I hadnt checked the repo :(
Here is a patch against dev that splits the permissions into view, edit, delete and also removes the VBO dependency turning it into a regular view that works. The only thing that is not working is that anyone with view subusers permission can view any accounts subusers page by going direct to the url user/%/subuser. For my own case its ok but most likely not for others.
Comment #19
7wonders commentedComment #20
boombatower commentedI made the following commit to fix up view http://drupalcode.org/project/subuser.git/commitdiff/83c2058004d78ea4c58....
The rest of the patch seems messy since it has everything indented and what not. Sounds like we also have a major permission issue that needs fixing. Also lets update patches in issues so I have something to commit since I am not going to commit one big patch.
Thanks for your help.
Comment #21
7wonders commentedSorry about that, had just switched ide and not set the settings properly :(
I have added two patches to the relevant issues:
1. Add view/edit/delete permissions
http://drupal.org/node/1213566#comment-6364702
2. Improve the view further (above patch as dependency)
http://drupal.org/node/1204692#comment-6364728
Will see if I can fix the being able to view others subusers.
Comment #22
hanskuiters commented@7wonders: lost track of all releases and patches. But bafter adding all patches manually, I have a working version. Thanks for now.
I am in two projects now using subuser module. Deadlines first week october and third week november. If you have a clean dev release, I can do the testing for you.
Comment #23
7wonders commented@capono - use the latest dev from git http://drupalcode.org/project/subuser.git/tree/refs/heads/7.x-2.x and apply the two patches above and you will have a pretty good release except for this one BIG issue
"The only thing that is not working is that anyone with view subusers permission can view any accounts subusers page by going direct to the url user/%/subuser."
I started a new issue for that - http://drupal.org/node/1738602
Comment #24
hanskuiters commentedOk, I'll check it out. In the current state on my sandbox the BIG issue is present too. But one can view another persons subusers PAGE, but one does not see any subusers. Maybe that is because of some difference between my state and your latest dev. To be continued...
Comment #25
hanskuiters commented@7wonders: you dev does not have an updated install file. Attached is mine. With this the relation type is saved.
Comment #26
willie.sanchez@gmail.com commentedI've been working on the subuser module for days and trying to get it to work properly. I finally installed your version and I STILL cannot get the parent to be able to edit the subuser it created. The permissions are set so that the parent role can create a sub role and edit/delete the subroll. However, the parent NEVER sees the edit link unless I enable administer and view users. Which was the whole point of some of these updates I thought. Head is spinning. Anyone want to provide a little assistance?
UPDATED - NEVER MIND
I decided to uninstall, remove the views and relations manually if they still existed after uninstall, and installed again. Works now. PHEW
Comment #27
hanskuiters commentedThat's right, you need to remove the views and relations manually if you had a previous version installed.
Comment #28
kaizerking commentedI am lost which one to down load?
Comment #29
kaizerking commentedas explained at #23 , i cloned the 7.2 and applied patch when i tried to install subsuer my site broke with the following error
SearchApiException: Unknown or invalid item type node. in search_api_get_datasource_controller() (line 1319 of C:\xampp\htdocs\....\profiles\recruiter\modules\search_api\search_api.module).
Comment #30
jacks0_0 commentedCan you guys provide the lastest dev version of this mod?
Thank you
Comment #31
marcusx commented@jacks0_0
You can always check out the latest versions snapshot from the repo viewer:
http://drupalcode.org/project/subuser.git (the snapshot link ist the most right one on each commit )
Today this is:
http://drupalcode.org/project/subuser.git/snapshot/83c2058004d78ea4c58da...
Comment #32
marcusx commented@kaizerking / #29
You should open an issue in the search_api project.
http://drupal.org/project/issues/search_api?categories=bug
Or at least open a separate issue for this problem if you are sure that subuser does something wrong. But than you need to provide more information what this is.
Comment #33
sathishdevan commented@marcusx
I have used the latest snapshot from the above url, But still the parent users can't the edit the subusers(which they have created).
Comment #34
marcusx commented@sathishdevan87
Subuser doesn't have this functionality. You can only enable the subuser switch module and allow a mainuser to masquerade as a subuser.
If this is not sufficient for you, I have a custom module that adds this functionality on top of subuser. It is not standalone and buried with other functions but it might be possible to separate this. I will not have time at the moment to make a clean drop in solution right now - but if you wan't to start yourself I can help you.
If you wan't to see this in subuser you should open a new issue with a feature request. You can discuss with the maintainer if he is willing to add such a functionality as a submodule. If there is a positive feedback I can cleanup my code and provide a patch for this.
Edit:
There is already a patch for this #1213566: Add View/Edit/Delete Functionality. And I see you have already found it.
Comment #35
boombatower commentedThere is a permission for allowing parents to edit their children...
Comment #36
marcusx commentedBut only in the D6 version, or?
There is in 7.x
But as far as I see there is no code that utilizes the 'administer subusers' permission.
Am I looking on the wrong place?
Anyway I might be wrong, here is the code from my custom permission if it is helpfull for someone:
Comment #37
sathishdevan commented@marcusx,
Thanks for the above code.
Yes You are right, the D7 version doesn't uses the 'administer subusers' permission at all. I hope Your code will provide the permissions for the parent users to edit/view/delete their subusers.
Also, Please have a look at the patch available in the below path. I have applied the patch and now the parent user can view/edit/delete their subusers but the view displayed in the subusers tab(of parent user) doesn't have edit/view links for the subusers.
http://drupal.org/node/1213566
When I preview the subuser's view(as an administrator), I am can see the edit/view links of the subusers. But those links are not available when I log-in as a parent user.
How do I update the subuser view to work perfectly.
Comment #38
jchmura commentedI would love to see a full D7 port, and would be glad to do help contribute a bit to help out. Unfortunately, I doubt our nonprofit budget can provide 100% of what is needed. Anybody else interested in helping to make this happen?
Comment #39
Anonymous (not verified) commented@ 7wonders - your fix worked (#23) worked like a charm. I'm also seeing the problem you described about anyone with view subusers permission being able to view any other user's list of sub users by going directly to the url user/%/subuser, however, at least you cannot edit someone else's sub users.
Comment #40
7wonders commentedHere is the latest version I have been using myself.
Its working well together with latest dev of relation and latest views. It contains all the patches I have added to the issue queue already and some further improvements I have needed on other projects.
Subuser switch has been removed from this version as it does not work with the changes I have made.
Comment #41
sansui commentedCan confirm that 7wonders version is working great. Use this version, not the official release
Comment #42
rajeevk@7wonders - Yes it's working...many many thanks to you. But still I am not able to find the table which can give me the the UID of parent user, if I have UID of Subuser. How can I get that ?
Thanks :)
Comment #43
Anonymous (not verified) commentedpatch for install file
Instead of an array is an object passed now.
Comment #44
lauriiiI have created a sandbox for this project https://drupal.org/sandbox/lauriii/2011550
Comment #45
lauriiiCommited and pushed #18 to fix that nasty security hole where users were able to see other users subusers.
Comment #46
Leeteq commentedhmmm, this change seems to have gone only into the latest alpha, and not also into the -dev version which still shows an october date for its latest update...
Comment #47
lauriiiIt should come there, dev release is an automated snapshot of the dev branch.
Comment #49
mooru commentedI installed the alpha-3 version but couldn't see the subuser menu on account page except logged in as admin. Default permission set by subuser is view subuser. I changed the permission to edit subuser in views and it worked. but this shouldn't be ................ or should it?
Comment #50
lauriiiHave you tried flushing caches? The subuser listing should be handled by subuser view permission. You can also try the latest release, which has a new subuser_ui module.
Comment #51
longlivelance commentedThis is an issue with the permissions. The view is calling for the permission "view subuser" but the permission is "view subusers".
I can see that the fix has already been committed to the most recent dev version of this module.
To fix it in alpha 3, just go to the VIews UI and click the old permission, then select the proper "view subusers" permission from the drop down.