aboutsummaryrefslogtreecommitdiffstats
path: root/docs/install/index.md
blob: 22abb263d5110c1d5bd9861e29e51335744362cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
layout: page
title: Installing
---

# Installing FixMyStreet Platform

<p class="lead">
  There are several options for installing the FixMyStreet platform,
  including Docker, an AMI for Amazon EC2 or an installation script.
</p>

## Ways to install

* [Use Docker]({{ "/install/docker/" | relative_url }})
* [Use an install script for Debian or Ubuntu servers]({{ "/install/install-script/" | relative_url }})
* [Use a FixMyStreet AMI for Amazon EC2]({{ "/install/ami/" | relative_url }})
* [Vagrant installation]({{ "/install/vagrant/" | relative_url }}), for development
* [Install the software manually]({{ "/install/manual-install/" | relative_url }})

FixMyStreet is a web application written in Perl, using the Catalyst framework.
Installation deploys the core code and also manages its dependencies.

If you're not technical, this can be a little daunting &mdash; if you haven't
already done so, [get in touch]({{ "/community" | relative_url }}) and ask for help.

Please also see the instructions for [updating your code](/updating/) once it's installed.

If you're trying to set a FixMyStreet project up outside the UK, let the 
[international team](https://www.mysociety.org/about/mysociety-around-the-world/)
know by emailing
<a href="mailto:international&#64;mysociety.org">international&#64;mysociety.org</a>.
le>
aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/ability_spec.rb
blob: f075d0f32efa7fe2b4f91751cd95dbf64213aab4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Ability do
  describe ".can_update_request_state?" do
    context "old and unclassified request" do
      let(:request) { mock_model(InfoRequest, :is_old_unclassified? => true) }

      context "logged out" do
        let(:user) { nil }
        before(:each) { request.stub!(:is_owning_user?).and_return(false) }
        it { Ability::can_update_request_state?(user, request).should be_false }
      end

      context "logged in but not owner of request" do
        let(:user) { mock_model(User) }
        before(:each) { request.stub!(:is_owning_user?).and_return(false) }

        it { Ability::can_update_request_state?(user, request).should be_true }
      end
    end

    context "new request" do
      let(:request) { mock_model(InfoRequest, :is_old_unclassified? => false) }

      context "logged out" do
        let(:user) { nil }
        before(:each) { request.stub!(:is_owning_user?).and_return(false) }

        it { Ability::can_update_request_state?(user, request).should be_false }
      end

      context "logged in" do
        let(:user) { mock_model(User) }

        # An owner of a request can also be someone with admin powers
        context "as owner of request" do
          before(:each) { request.stub!(:is_owning_user?).and_return(true) }

          it { Ability::can_update_request_state?(user, request).should be_true }
        end

        context "but not owner of request" do
          before(:each) { request.stub!(:is_owning_user?).and_return(false) }

          it { Ability::can_update_request_state?(user, request).should be_false }
        end
      end
    end
  end
end