projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Override hashCode() and equals() in Phrase.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
CreateSonePage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java
b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java
index
719f4c6
..
3f940a3
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/CreateSonePage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/CreateSonePage.java
@@
-1,5
+1,5
@@
/*
/*
- *
Freenet
Sone - CreateSonePage.java - Copyright © 2010 David Roden
+ * Sone - CreateSonePage.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
@@
-129,7
+129,10
@@
public class CreateSonePage 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);
}
}
}
}