projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow sorting and filtering of “known Sones.”
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
LogoutPage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/LogoutPage.java
b/src/main/java/net/pterodactylus/sone/web/LogoutPage.java
index
50266bd
..
7cd0587
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/LogoutPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/LogoutPage.java
@@
-1,5
+1,5
@@
/*
/*
- *
Freenet
Sone - LogoutPage.java - Copyright © 2010 David Roden
+ * Sone - LogoutPage.java - Copyright © 2010 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-57,7
+57,10
@@
public class LogoutPage extends SoneTemplatePage {
*/
@Override
public boolean isEnabled(ToadletContext toadletContext) {
*/
@Override
public boolean isEnabled(ToadletContext toadletContext) {
- return getCurrentSone(toadletContext) != null;
+ if (webInterface.getCore().getPreferences().isRequireFullAccess() && !toadletContext.isAllowedFullAccess()) {
+ return false;
+ }
+ return (getCurrentSone(toadletContext, false) != null) && (webInterface.getCore().getLocalSones().size() != 1);
}
}
}
}