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:
commit
87ba56ba67
21
awx/main/migrations/0034_v330_more_oauth2_help_text.py
Normal file
21
awx/main/migrations/0034_v330_more_oauth2_help_text.py
Normal 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']."),
|
||||||
|
),
|
||||||
|
]
|
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user