Permalink
Browse files

don't show the account tab for conference admins if the current perso…

…n has no account yet
  • Loading branch information...
1 parent 6b46620 commit f1943b80ba43f7487cf4f6b94ac438d342cc8e8a @nevs committed Nov 24, 2009
Showing with 6 additions and 1 deletion.
  1. +6 −1 rails/app/views/person/edit.rxml
@@ -10,7 +10,12 @@ end
tabs = [:general,:availability,:events,:contact,:description,:links,:rating,:travel]
-tabs << :account if POPE.conference_permission?('account_conference_role::create', POPE.user.current_conference_id) || POPE.user.person_id == @person.person_id
+if POPE.user.person_id == @person.person_id ||
+ POPE.permission?('account::modify') || # global admins
+ ( POPE.conference_permission?('account_conference_role::create', POPE.user.current_conference_id) &&
+ !@account.new_record? ) # conference adins
+ tabs << :account
+end
xml << js_tabs( tabs )

0 comments on commit f1943b8

Please sign in to comment.