]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/newgroup.php
Session GC fix: save session.modified field as UTC so our comparisons work.
[quix0rs-gnu-social.git] / actions / newgroup.php
index 05520223c0f7c6fb5b64e77545547503f8ffeaae..04441e71c64952c3d42f5096e51984568c0b7a8f 100644 (file)
@@ -66,6 +66,13 @@ class NewgroupAction extends Action
             return false;
         }
 
+        $user = common_current_user();
+        $profile = $user->getProfile();
+        if (!$profile->hasRight(Right::CREATEGROUP)) {
+            // TRANS: Client exception thrown when a user tries to create a group while banned.
+            throw new ClientException(_('You are not allowed to create groups on this site.'), 403);
+        }
+
         return true;
     }