aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm10
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyBarangay.pm4
-rwxr-xr-xtemplates/web/fixmystreet/around/display_location.html5
3 files changed, 19 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index f4762904c..c26ea63b3 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -920,5 +920,15 @@ sub example_places {
return [ 'B2 4QA', 'Tib St, Manchester' ];
}
+=head2 only_authed_can_create
+
+If true, only users with the from_council flag set are able to create reports.
+
+=cut
+
+sub only_authed_can_create {
+ return 0;
+}
+
1;
diff --git a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm
index 0328ff334..01e0670d6 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm
@@ -28,5 +28,9 @@ sub site_title {
return 'FixMyBarangay';
}
+sub only_authed_can_create {
+ return 1;
+}
+
1;
diff --git a/templates/web/fixmystreet/around/display_location.html b/templates/web/fixmystreet/around/display_location.html
index c98982a60..3549e98ac 100755
--- a/templates/web/fixmystreet/around/display_location.html
+++ b/templates/web/fixmystreet/around/display_location.html
@@ -69,6 +69,7 @@
<div id="side">
+ [% IF NOT c.cobrand.only_authed_can_create OR (c.user AND c.user.belongs_to_council) %]
<h1 class="big-green-banner">[% loc( 'Click map to report a problem' ) %]</h1>
<p id="skip-this-step">
@@ -79,6 +80,7 @@
)
%]
</p>
+ [% END %]
<div class="shadow-wrap">
<ul id="key-tools" class="singleton">
@@ -104,6 +106,7 @@
</section>
</div>
+ [% IF NOT c.cobrand.only_authed_can_create OR (c.user AND c.user.belongs_to_council) %]
<div style="display:none" id="side-form">
[% INCLUDE "report/new/fill_in_details_form.html"
js = 1,
@@ -111,6 +114,8 @@
report.name = c.user.name
%]
</div>
+ [% END %]
+
</form>
[% INCLUDE 'footer.html' %]