From ea5c5b2a03b558962c3ea2afca7c06b0d738ad3e Mon Sep 17 00:00:00 2001 From: Toks Date: Mon, 22 Apr 2013 21:00:38 -0400 Subject: [PATCH] fixes #1292 --- app/models/artist.rb | 3 ++- app/views/artists/_form.html.erb | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/artist.rb b/app/models/artist.rb index 093944fa8..2688709f1 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -11,7 +11,8 @@ class Artist < ActiveRecord::Base has_one :wiki_page, :foreign_key => "title", :primary_key => "name" has_one :tag_alias, :foreign_key => "antecedent_name", :primary_key => "name" accepts_nested_attributes_for :wiki_page - attr_accessible :body, :name, :url_string, :other_names, :other_names_comma, :group_name, :wiki_page_attributes, :notes, :is_active, :as => [:member, :privileged, :builder, :platinum, :contributor, :janitor, :moderator, :default, :admin] + attr_accessible :body, :name, :url_string, :other_names, :other_names_comma, :group_name, :wiki_page_attributes, :notes, :as => [:member, :privileged, :builder, :platinum, :contributor, :janitor, :moderator, :default, :admin] + attr_accessible :is_active, :as => [:builder, :contributor, :janitor, :moderator, :default, :admin] attr_accessible :is_banned, :as => :admin module UrlMethods diff --git a/app/views/artists/_form.html.erb b/app/views/artists/_form.html.erb index 9a64a4116..ef1d9de0e 100644 --- a/app/views/artists/_form.html.erb +++ b/app/views/artists/_form.html.erb @@ -8,7 +8,9 @@ <%= f.input :other_names_comma, :hint => "Separate with commas", :as => :text, :label => "Other names" %> <%= f.input :group_name %> <%= f.input :url_string, :label => "URLs", :as => :text, :input_html => {:size => "50x5"} %> - <%= f.input :is_active %> + <% if CurrentUser.is_builder? %> + <%= f.input :is_active %> + <% end %> <%= dtext_field "artist", "notes" %> <%= f.button :submit, "Submit" %>