Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Unified Diff: appengine/config_service/ui/src/config-ui/config-set.html

Issue 2990713002: config_service: change error message for error 403. (Closed)
Patch Set: Nit: change tests for config-set page. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/config_service/ui/src/config-ui/config-set.html
diff --git a/appengine/config_service/ui/src/config-ui/config-set.html b/appengine/config_service/ui/src/config-ui/config-set.html
index 2b99e1288514be3795f07f9f873b03cd62ebdd4d..7ae346fc4eca63c93b068e577a238fb597da0d12 100644
--- a/appengine/config_service/ui/src/config-ui/config-set.html
+++ b/appengine/config_service/ui/src/config-ui/config-set.html
@@ -171,7 +171,6 @@
is: "config-set",
properties: {
-
frontPageIsActive: {
type: Boolean,
observer: '_frontPageIsActive'
@@ -227,14 +226,16 @@
_frontPageIsActive: function() {
if (this.frontPageIsActive === false) {
this.isLoading = true;
- this.$.requestConfigs.generateRequest();
+ if (!this.initialized) {
+ document.addEventListener('fetch-configs', function() {
+ this.$.requestConfigs.generateRequest();
+ }.bind(this));
+ } else {
+ this.$.requestConfigs.generateRequest();
+ }
}
},
- ready: function() {
- this.isLoading = true;
- },
-
_isEmpty: function(list) {
return list.length === 0;
},
@@ -274,8 +275,13 @@
var error = parseInt(event.detail.error.message.match(/\d+/g));
this.isLoading = false;
if (error === 403) {
- this.errorMessage = "Authorization required to view this config set. " +
- "Please sign in.";
+ if (!this.auth_headers) {
+ this.errorMessage = "Access denied, please sign in.";
+ } else {
+ this.errorMessage = "Access denied, " + this.profile.email +
+ " is not authorized to access this config set." +
+ " Request access or sign in as a different user.";
+ }
} else if (500 <= error && error < 600) {
this.errorMessage = "Internal server error.";
} else {
« no previous file with comments | « appengine/config_service/ui/common/auth-signin.html ('k') | appengine/config_service/ui/src/config-ui/config-ui.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698