Exemplo n.º 1
0
 def _process(self):
     key = self.user.api_key
     use_signatures = api_settings.get('security_mode') in {APIMode.SIGNED, APIMode.ONLYKEY_SIGNED,
                                                            APIMode.ALL_SIGNED}
     allow_persistent = api_settings.get('allow_persistent')
     old_keys = self.user.old_api_keys
     return WPAPIUserProfile.render_template('user_profile.html', user=self.user, key=key, old_keys=old_keys,
                                             use_signatures=use_signatures, allow_persistent=allow_persistent,
                                             can_modify=(not key or not key.is_blocked or session.user.is_admin))
Exemplo n.º 2
0
 def _process(self):
     key = self.user.api_key
     use_signatures = api_settings.get('security_mode') in {APIMode.SIGNED, APIMode.ONLYKEY_SIGNED,
                                                            APIMode.ALL_SIGNED}
     allow_persistent = api_settings.get('allow_persistent')
     old_keys = self.user.old_api_keys
     return WPAPIUserProfile.render_template('user_profile.html', user=self.user, key=key, old_keys=old_keys,
                                             use_signatures=use_signatures, allow_persistent=allow_persistent,
                                             can_modify=(not key or not key.is_blocked or session.user.is_admin))