From 50a5a1a9f8ef8bfc0e0eb85dc21ea3d3f86d34f5 Mon Sep 17 00:00:00 2001 From: adamscmRH Date: Tue, 17 Apr 2018 14:26:17 -0400 Subject: [PATCH] adds help-text for scopes --- .../0034_v330_more_oauth2_help_text.py | 21 +++++++++++++++++++ awx/main/models/oauth.py | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 awx/main/migrations/0034_v330_more_oauth2_help_text.py diff --git a/awx/main/migrations/0034_v330_more_oauth2_help_text.py b/awx/main/migrations/0034_v330_more_oauth2_help_text.py new file mode 100644 index 0000000000..7dc6f222ef --- /dev/null +++ b/awx/main/migrations/0034_v330_more_oauth2_help_text.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.11 on 2018-04-17 18:36 +from __future__ import unicode_literals + +from django.db import migrations, models + +# TODO: Squash all of these migrations with '0024_v330_add_oauth_activity_stream_registrar' + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0032_v330_delete_user_role'), + ] + + operations = [ + migrations.AlterField( + model_name='oauth2accesstoken', + name='scope', + field=models.TextField(blank=True, help_text="Allowed scopes, further restricts user's permissions. Must be a simple space-separated string with allowed scopes ['read', 'write']."), + ), + ] diff --git a/awx/main/models/oauth.py b/awx/main/models/oauth.py index 248df271a6..45e13fc8b0 100644 --- a/awx/main/models/oauth.py +++ b/awx/main/models/oauth.py @@ -109,7 +109,7 @@ class OAuth2AccessToken(AbstractAccessToken): ) scope = models.TextField( blank=True, - help_text=_('Allowed scopes, further restricts user\'s permissions.') + help_text=_('Allowed scopes, further restricts user\'s permissions. Must be a simple space-separated string with allowed scopes [\'read\', \'write\'].') ) def is_valid(self, scopes=None):