|
@@ -346,7 +346,11 @@ def has_iam_metadata():
|
|
|
|
|
|
|
|
def has_s3_access(user):
|
|
def has_s3_access(user):
|
|
|
from desktop.auth.backend import is_admin
|
|
from desktop.auth.backend import is_admin
|
|
|
- return user.is_authenticated and user.is_active and (is_admin(user) or user.has_hue_permission(action="s3_access", app="filebrowser"))
|
|
|
|
|
|
|
+ from desktop.conf import RAZ # Must be imported dynamically in order to have proper value
|
|
|
|
|
+
|
|
|
|
|
+ return user.is_authenticated and user.is_active and (
|
|
|
|
|
+ is_admin(user) or user.has_hue_permission(action="s3_access", app="filebrowser") or RAZ.IS_ENABLED.get()
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
|
|
|
|
|
def config_validator(user):
|
|
def config_validator(user):
|