mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 07:04:45 -03:30
blacklist certain sensitive fields and relations as search arguments
see: #5465 see: #5478
This commit is contained in:
@@ -8,7 +8,7 @@ import json
|
||||
from django.db import models
|
||||
|
||||
# Tower
|
||||
from awx.main.models.base import CreatedModifiedModel
|
||||
from awx.main.models.base import CreatedModifiedModel, prevent_search
|
||||
from awx.main.fields import JSONField
|
||||
from awx.main.utils import encrypt_field
|
||||
from awx.conf import settings_registry
|
||||
@@ -24,14 +24,14 @@ class Setting(CreatedModifiedModel):
|
||||
value = JSONField(
|
||||
null=True,
|
||||
)
|
||||
user = models.ForeignKey(
|
||||
user = prevent_search(models.ForeignKey(
|
||||
'auth.User',
|
||||
related_name='settings',
|
||||
default=None,
|
||||
null=True,
|
||||
editable=False,
|
||||
on_delete=models.CASCADE,
|
||||
)
|
||||
))
|
||||
|
||||
def __unicode__(self):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user