From 0442cd19bc9383669b506185356227361a16e442 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 09:29:40 -0500 Subject: call_forwards - polymorphism added --- app/models/ability.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/ability.rb') diff --git a/app/models/ability.rb b/app/models/ability.rb index d66577d..d886d53 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -129,7 +129,7 @@ class Ability can :read, SipAccount, :sip_accountable_type => 'User', :sip_accountable_id => user.id user.sip_accounts.each do |sip_account| can :read, PhoneNumber, :id => sip_account.phone_number_ids - can :manage, CallForward, :phone_number_id => sip_account.phone_number_ids + can :manage, CallForward, :call_forwardable_id => sip_account.phone_number_ids can :manage, Ringtone, :ringtoneable_type => 'PhoneNumber', :ringtoneable_id => sip_account.phone_number_ids can [:read, :destroy, :call] , CallHistory, :id => sip_account.call_history_ids end @@ -158,7 +158,7 @@ class Ability # User can manage CallForwards of the PhoneNumbers of his # own SipAccounts: # - can :manage, CallForward, :phone_number_id => user.phone_number_ids + can :manage, CallForward, :call_forwardable_id => user.phone_number_ids # SoftkeyFunctions # -- cgit v1.2.3 From ffaa80e8d46b3b6b7597af6f157724005f48bae4 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 26 Feb 2013 10:48:08 +0100 Subject: RestoreJob scaffold --- app/models/ability.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models/ability.rb') diff --git a/app/models/ability.rb b/app/models/ability.rb index d886d53..690ee76 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -176,6 +176,7 @@ class Ability # can :create, GemeinschaftSetup can :manage, SipDomain + can [:create, :new, :show, :index], RestoreJob end end -- cgit v1.2.3 From ba0dc7a5cefe825fe0b09e2d6ccf9821bb20c7f9 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 26 Feb 2013 16:37:14 -0500 Subject: manage ringtones ability added --- app/models/ability.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models/ability.rb') diff --git a/app/models/ability.rb b/app/models/ability.rb index 690ee76..e885c53 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -131,6 +131,7 @@ class Ability can :read, PhoneNumber, :id => sip_account.phone_number_ids can :manage, CallForward, :call_forwardable_id => sip_account.phone_number_ids can :manage, Ringtone, :ringtoneable_type => 'PhoneNumber', :ringtoneable_id => sip_account.phone_number_ids + can :manage, Ringtone, :ringtoneable_type => 'SipAccount', :ringtoneable_id => sip_account.id can [:read, :destroy, :call] , CallHistory, :id => sip_account.call_history_ids end can :read, Phone, :phoneable_type => 'User', :phoneable_id => user.id -- cgit v1.2.3 From 22eb173c74893114350e4b5351a58b48673f63b3 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 26 Feb 2013 18:21:52 -0500 Subject: call ability added to SipAccount --- app/models/ability.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/ability.rb') diff --git a/app/models/ability.rb b/app/models/ability.rb index e885c53..be64528 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -126,7 +126,7 @@ class Ability # SipAccounts and Phones # - can :read, SipAccount, :sip_accountable_type => 'User', :sip_accountable_id => user.id + can [:read, :call], SipAccount, :sip_accountable_type => 'User', :sip_accountable_id => user.id user.sip_accounts.each do |sip_account| can :read, PhoneNumber, :id => sip_account.phone_number_ids can :manage, CallForward, :call_forwardable_id => sip_account.phone_number_ids -- cgit v1.2.3 From 7f404c454afc6c546fba6885dbcf409f67a73d0f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 27 Feb 2013 06:53:20 +0100 Subject: Rights for the call action of a SipAccount. --- app/models/ability.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/ability.rb') diff --git a/app/models/ability.rb b/app/models/ability.rb index be64528..2e270da 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -169,6 +169,10 @@ class Ability # can :manage, VoicemailMessage can :manage, VoicemailSetting + + # Can initiate a call + # + can :call, SipAccount end end else -- cgit v1.2.3 From 15d5f410afafce67b61a27479a21546cebd48ed9 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 27 Feb 2013 10:23:26 +0100 Subject: Show a restore link in the setup navigation bar. --- app/models/ability.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/models/ability.rb') diff --git a/app/models/ability.rb b/app/models/ability.rb index 2e270da..23af525 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -90,6 +90,11 @@ class Ability # SIM cards # cannot [:edit, :update], SimCard + + # Restore is only possible on a new system. + # + cannot :manage, RestoreJob + else # Any user can do the following stuff. # -- cgit v1.2.3 From cf5938150ba3efc38feaf28f9dee6b174893430e Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 27 Feb 2013 10:41:20 +0100 Subject: Delete dupe entry. --- app/models/ability.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app/models/ability.rb') diff --git a/app/models/ability.rb b/app/models/ability.rb index 23af525..3ba4481 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -174,10 +174,6 @@ class Ability # can :manage, VoicemailMessage can :manage, VoicemailSetting - - # Can initiate a call - # - can :call, SipAccount end end else -- cgit v1.2.3