1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Merge pull request #1409 from rooftopcellist/validate_scopes

adds help-text for scopes
This commit is contained in:
Christian Adams 2018-04-18 10:09:59 -04:00 committed by GitHub
commit 87ba56ba67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View File

@ -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']."),
),
]

View File

@ -109,7 +109,7 @@ class OAuth2AccessToken(AbstractAccessToken):
) )
scope = models.TextField( scope = models.TextField(
blank=True, 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): def is_valid(self, scopes=None):