changeset 25:ea1d2e6e2a49

semiprivate
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 18 Jun 2020 19:26:15 -0600
parents e0c501fb5229
children 0c48ede1829a
files src/nabble/modules/naml/semiprivate.naml src/nabble/view/naml/permissions.naml src/nabble/view/web/app/Addons.java src/nabble/view/web/app/Addons.jtp
diffstat 4 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/nabble/modules/naml/semiprivate.naml	Thu Jun 18 19:26:15 2020 -0600
@@ -0,0 +1,3 @@
+<override_macro name="is_semiprivate">
+    <n.true />
+</override_macro>
--- a/src/nabble/view/naml/permissions.naml	Sun Jun 14 17:56:59 2020 -0600
+++ b/src/nabble/view/naml/permissions.naml	Thu Jun 18 19:26:15 2020 -0600
@@ -324,6 +324,9 @@
 </macro>
 
 
+<macro name="is_semiprivate">
+	<n.is_new />
+</macro>
 
 <macro name="get read authorization key" requires="http_request">
 	<n.if.not.has_parameter name="node">
@@ -335,9 +338,9 @@
 		</n.if.equal>
 		<n.if.is_private>
 			<then.get_private_node.id />
-			<else.if.is_new>
+			<else.if.is_semiprivate>
 				<then.id />
-			</else.if.is_new>
+			</else.if.is_semiprivate>
 		</n.if.is_private>
 	</n.get_node_from_parameter.>
 </macro>
--- a/src/nabble/view/web/app/Addons.java	Sun Jun 14 17:56:59 2020 -0600
+++ b/src/nabble/view/web/app/Addons.java	Thu Jun 18 19:26:15 2020 -0600
@@ -68,6 +68,7 @@
 			"The text between the tags is the snippet to be displayed on the news page and will NOT appear on the post page."
 		);
 		addModule("Content",  "forum_avatars", "Show avatars on forum page", "Shows the avatar for the first and last post of each topic on the forum page.");
+		addModule("Content",  "semiprivate", "Restrict to registered users", "Only allow registered users to view the forum.  This has no effect for new forums which are restricted by default.");
 
 		addModule("Email & Notifications",  "email_registration_notification", "Notify me when someone registers", "When a user completes the registration process, an email is sent to all administrators with the details of the user (e.g., username, email, link to profile page).");
 
--- a/src/nabble/view/web/app/Addons.jtp	Sun Jun 14 17:56:59 2020 -0600
+++ b/src/nabble/view/web/app/Addons.jtp	Thu Jun 18 19:26:15 2020 -0600
@@ -68,6 +68,7 @@
 			"The text between the tags is the snippet to be displayed on the news page and will NOT appear on the post page."
 		);
 		addModule("Content",  "forum_avatars", "Show avatars on forum page", "Shows the avatar for the first and last post of each topic on the forum page.");
+		addModule("Content",  "semiprivate", "Restrict to registered users", "Only allow registered users to view the forum.  This has no effect for new forums which are restricted by default.");
 
 		addModule("Email & Notifications",  "email_registration_notification", "Notify me when someone registers", "When a user completes the registration process, an email is sent to all administrators with the details of the user (e.g., username, email, link to profile page).");