mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
remove default app creation
This commit is contained in:
@@ -594,7 +594,7 @@ class OAuth2ApplicationAccess(BaseAccess):
|
||||
|
||||
class OAuth2TokenAccess(BaseAccess):
|
||||
'''
|
||||
I can read, change or delete an OAuth token when:
|
||||
I can read, change or delete an OAuth2 token when:
|
||||
- I am a superuser.
|
||||
- I am the admin of the organization of the user of the token.
|
||||
- I am the user of the token.
|
||||
|
||||
@@ -620,12 +620,12 @@ def create_access_token_user_if_missing(sender, **kwargs):
|
||||
post_save.connect(create_access_token_user_if_missing, sender=OAuth2AccessToken)
|
||||
|
||||
|
||||
@receiver(post_save, sender=User)
|
||||
def create_default_oauth_app(sender, **kwargs):
|
||||
if kwargs.get('created', False):
|
||||
user = kwargs['instance']
|
||||
OAuth2Application.objects.create(
|
||||
name='Default application for {}'.format(user.username),
|
||||
user=user, client_type='confidential', redirect_uris='',
|
||||
authorization_grant_type='password'
|
||||
)
|
||||
# @receiver(post_save, sender=User)
|
||||
# def create_default_oauth_app(sender, **kwargs):
|
||||
# if kwargs.get('created', False):
|
||||
# user = kwargs['instance']
|
||||
# OAuth2Application.objects.create(
|
||||
# name='Default application for {}'.format(user.username),
|
||||
# user=user, client_type='confidential', redirect_uris='',
|
||||
# authorization_grant_type='password'
|
||||
# )
|
||||
|
||||
Reference in New Issue
Block a user