|
|
@ -37,10 +37,21 @@ describe Ability do |
|
|
|
other_user.should be_able_to(:manage, soa_record) |
|
|
|
other_user.should be_able_to(:manage, soa_record) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "denies third user to manage user's permitted domains and records" do |
|
|
|
|
|
|
|
third_user.should_not be_able_to(:manage, domain) |
|
|
|
|
|
|
|
third_user.should_not be_able_to(:manage, a_record) |
|
|
|
|
|
|
|
third_user.should_not be_able_to(:manage, soa_record) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "allows other user to manage user's permitted subdomains" do |
|
|
|
it "allows other user to manage user's permitted subdomains" do |
|
|
|
other_user.should be_able_to(:manage, subdomain) |
|
|
|
other_user.should be_able_to(:manage, subdomain) |
|
|
|
other_user.should be_able_to(:manage, subsubdomain) |
|
|
|
other_user.should be_able_to(:manage, subsubdomain) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "denies third user to manage other user's permitted subdomains" do |
|
|
|
|
|
|
|
third_user.should_not be_able_to(:manage, subdomain) |
|
|
|
|
|
|
|
third_user.should_not be_able_to(:manage, subsubdomain) |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "permission" do |
|
|
|
context "permission" do |
|
|
|