File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 12
12
from aleph .model import Role
13
13
from aleph .logic .roles import challenge_role , update_role , create_user , get_deep_role
14
14
from aleph .logic .api_keys import generate_user_api_key
15
+ from aleph .settings import SETTINGS
15
16
from aleph .util import is_auto_admin
16
17
from aleph .views .serializers import RoleSerializer
17
18
from aleph .views .util import require , jsonify , parse_request , obj_or_404
@@ -194,6 +195,12 @@ def view(id):
194
195
data = role .to_dict ()
195
196
if request .authz .can_write_role (role .id ):
196
197
data .update (get_deep_role (role ))
198
+ if SETTINGS .MAINTENANCE :
199
+ # Prevent continuous fetching of profile information in maintenance mode.
200
+ # This is a workaround for the improper permission system (see "write" access).
201
+ # This results in the email address not being shown on the profile page in
202
+ # maintenance mode, but there is no other way to prevent constant re-fetching.
203
+ data .update ({"shallow" : False })
197
204
return RoleSerializer .jsonify (data )
198
205
199
206
You can’t perform that action at this time.
0 commit comments