Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As the title states, there should be a permission setting that will remove the tab from the user page. I currently user OAuth to connect to google analytics API, and don't want all my users seeing an authorize tab on their user page.
Comment | File | Size | Author |
---|---|---|---|
#6 | admin | Site-Install.png | 26.54 KB | eojthebrave |
#6 | 1133778-6-oauth-menu_callback_permissions_7x.patch | 5.31 KB | eojthebrave |
#5 | 1133778-5-oauth-menu_callback_permissions.patch | 2.42 KB | eojthebrave |
Comments
Comment #1
voxpelli CreditAttribution: voxpelli commented+1 on this. Until then - use a hook_menu_alter() or something to hide it.
Comment #2
tryitonce CreditAttribution: tryitonce commentedSubscribing - would like to have it removed as well.
And would like to get either more details on how to use the hook or more details on another method.
Thanks ....
Comment #3
tryitonce CreditAttribution: tryitonce commentedit seems tab tamer is one solution - http://drupal.org/project/tabtamer
..............
Comment #4
COBadger CreditAttribution: COBadger commentedThere's a really simple implementation of hook_menu_alter() that I just followed at: http://drupal.org/node/483324
To do the same thing, you'll need to create a custom module (not so scary, actually) with a .info file and a .module file; in the .module file you'll place the code from the above-referenced URL and include the line:
$items['user/%user/oauth']['type'] = MENU_CALLBACK;
in the main function.
I've commented out the other $items lines in the function.
Works in my Drupal 7 site.
Comment #5
eojthebraveI think it makes sense to split the Authorizations and Consumers to separate tabs. Or at least come up with a way that you can show people a list of consumers without having to also show them a list of authorizations or the other way around.
The use case that I'm running in to right now is that I'm using the oauth module to do 2-legged oauth for applications that want to access a services.module endpoint. Basically requiring an API key in order to use the API. However, I'm not ever using the 'Authorizations' part of OAuth since the API will use session based authorization for a full user account. But I do need user's with the appropriate permission to be able to log in and either access or generate a set of consumer keys for use in their application.
This is my proposed solution.
Comment #6
eojthebraveAnd here's a patch that does the same thing for the 7.x version of the module. This one also makes some of the menu items MENU_LOCAL_ACTION instead of MENU_LOCAL_TASK for better nesting and semantics.
Looks like this. Which I think is a big improvement to the UX. We might also want to add some help text to those pages but that's for another issue.
Comment #7
muschpusch CreditAttribution: muschpusch commented#6 works great and is pretty straight forward! + 1 for committing
Comment #8
msavike CreditAttribution: msavike commentedOn the prod site, I simply disabled Ouath UI, but on the dev, I had it enabled.
It works.
Comment #9
rroose CreditAttribution: rroose commentedBest solution. Thanks!
Comment #10
juampynr CreditAttribution: juampynr commentedCommitted. Thanks!
http://drupalcode.org/project/oauth.git/commitdiff/76309d6