@ -15,10 +15,10 @@ describe Ability do
end
end
it " denies other user to manage my domains and their records, and my hosts " do
it " denies other user to manage my domains and their records, and my hosts " do
other_ user. should_not be_able_to ( :manage , domain )
user2 . should_not be_able_to ( :manage , domain )
other_ user. should_not be_able_to ( :manage , a_record )
user2 . should_not be_able_to ( :manage , a_record )
other_ user. should_not be_able_to ( :manage , soa_record )
user2 . should_not be_able_to ( :manage , soa_record )
other_ user. should_not be_able_to ( :manage , host_a_record )
user2 . should_not be_able_to ( :manage , host_a_record )
end
end
it " allows admin to manage other user's hosts " do
it " allows admin to manage other user's hosts " do
@ -32,25 +32,25 @@ describe Ability do
end
end
it " allows other user to manage user's domains and records, if permitted " do
it " allows other user to manage user's domains and records, if permitted " do
other_ user. should be_able_to ( :manage , domain )
user2 . should be_able_to ( :manage , domain )
other_ user. should be_able_to ( :manage , a_record )
user2 . should be_able_to ( :manage , a_record )
other_ user. should be_able_to ( :manage , soa_record )
user2 . should be_able_to ( :manage , soa_record )
end
end
it " denies third user to manage user's permitted domains and records " do
it " denies third user to manage user's permitted domains and records " do
third_ user. should_not be_able_to ( :manage , domain )
user3 . should_not be_able_to ( :manage , domain )
third_ user. should_not be_able_to ( :manage , a_record )
user3 . should_not be_able_to ( :manage , a_record )
third_ user. should_not be_able_to ( :manage , soa_record )
user3 . should_not be_able_to ( :manage , soa_record )
end
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 )
user2 . should be_able_to ( :manage , subdomain )
other_ user. should be_able_to ( :manage , subsubdomain )
user2 . should be_able_to ( :manage , subsubdomain )
end
end
it " denies third user to manage other user's permitted subdomains " do
it " denies third user to manage other user's permitted subdomains " do
third_ user. should_not be_able_to ( :manage , subdomain )
user3 . should_not be_able_to ( :manage , subdomain )
third_ user. should_not be_able_to ( :manage , subsubdomain )
user3 . should_not be_able_to ( :manage , subsubdomain )
end
end
end
end
@ -60,7 +60,7 @@ describe Ability do
end
end
it " denies other user to manage my domain's permissions " do
it " denies other user to manage my domain's permissions " do
other_ user. should_not be_able_to ( :manage , permission )
user2 . should_not be_able_to ( :manage , permission )
end
end
end
end