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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

voxpelli’s picture

+1 on this. Until then - use a hook_menu_alter() or something to hide it.

tryitonce’s picture

Subscribing - 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 ....

tryitonce’s picture

it seems tab tamer is one solution - http://drupal.org/project/tabtamer

..............

COBadger’s picture

There'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.

eojthebrave’s picture

Status: Active » Needs review
FileSize
2.42 KB

I 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.

eojthebrave’s picture

Version: 6.x-3.x-dev » 7.x-3.0
Component: Code » User interface
FileSize
5.31 KB
26.54 KB

And 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.

admin ux

muschpusch’s picture

Status: Needs review » Reviewed & tested by the community

#6 works great and is pretty straight forward! + 1 for committing

msavike’s picture

On the prod site, I simply disabled Ouath UI, but on the dev, I had it enabled.

It works.

rroose’s picture

Best solution. Thanks!

juampynr’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.