forked from cory/tildefriends
Make ~cory/index/ fail with a better error if not logged in, and require the administrator while I'm at it.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3629 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
9cf1d38611
commit
bdc9eb6598
@ -1 +1 @@
|
|||||||
{"type":"tildefriends-app","files":{"app.js":"&ovJdMIXT/ocLxZ1rO1N03SpZr3w3RFKCFXl+isnXcx4=.sha256","index.html":"&TFtniuUIVO7XeWCgwmqPAmuBzpGX6slxJQcPMEr+860=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256"}}
|
{"type":"tildefriends-app","files":{"app.js":"&6uFJG2C0kZar1Aj+7p2/KzYEBXgmK/uJSt7aIJqenN4=.sha256","index.html":"&TFtniuUIVO7XeWCgwmqPAmuBzpGX6slxJQcPMEr+860=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256"}}
|
@ -368,7 +368,14 @@ core.register('message', async function(m) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
await app.setDocument(utf8Decode(await getFile("index.html")));
|
if (core.user &&
|
||||||
|
core.user.credentials &&
|
||||||
|
core.user.credentials.permissions &&
|
||||||
|
core.user.credentials.permissions.administration) {
|
||||||
|
await app.setDocument(utf8Decode(await getFile("index.html")));
|
||||||
|
} else {
|
||||||
|
await app.setDocument('<div style="color: #f00">Only the administrator can use this app at this time. Login at the top right.</div>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
Loading…
Reference in New Issue
Block a user