2012-09-12 11:56:44 -04:00
|
|
|
module ProfileHelper
|
|
|
|
def oauth_active_class provider
|
|
|
|
if current_user.provider == provider.to_s
|
|
|
|
'active'
|
|
|
|
end
|
|
|
|
end
|
2013-09-03 17:53:01 -04:00
|
|
|
|
|
|
|
def show_profile_username_tab?
|
|
|
|
current_user.can_change_username?
|
|
|
|
end
|
|
|
|
|
|
|
|
def show_profile_social_tab?
|
2014-03-06 22:07:02 -05:00
|
|
|
enabled_social_providers.any? && !current_user.ldap_user?
|
2013-09-03 17:53:01 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def show_profile_remove_tab?
|
2013-10-17 15:11:41 -04:00
|
|
|
gitlab_config.signup_enabled && !current_user.ldap_user?
|
2013-09-03 17:53:01 -04:00
|
|
|
end
|
2012-09-12 11:56:44 -04:00
|
|
|
end
|