Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 2e2324386efa4222ee9f5ce1309c0611188a209e
- Author: Tinu Cleatus <tinu.cleatus@bltsol.com>
- Date: Fri Nov 28 19:39:18 2008 +0530
- Implemented watcher permission for private spaces. Re #2999
- diff --git a/app/helpers/spaces/users_helper.rb b/app/helpers/spaces/users_helper.rb
- index 1973f4e..960a640 100644
- --- a/app/helpers/spaces/users_helper.rb
- +++ b/app/helpers/spaces/users_helper.rb
- @@ -9,7 +9,7 @@ module Spaces::UsersHelper
- if user_role.owner?
- links << demote_link(@space.id, user_role.id) if count_owners > 1 && user_role.user!=current_user
- else
- - links << demote_link(@space.id, user_role.id) if (@space.public? ? !user_role.watcher? : !user_role.member?)
- + links << demote_link(@space.id, user_role.id) if (!@space.blank? ? !user_role.watcher? : !user_role.member?)
- end
- links << remind_link(user_role.user) if user_role.status == UserRole::INVITED
- diff --git a/app/models/space.rb b/app/models/space.rb
- index 229929d..acda72e 100644
- --- a/app/models/space.rb
- +++ b/app/models/space.rb
- @@ -166,6 +166,7 @@ class Space < ActiveRecord::Base
- PERMISSION_SELECTOR_PUBLIC = Array.new(PERMISSION_SELECTOR[0..-2]).freeze
- PERMISSION_SELECTOR_TEAM = Array.new(PERMISSION_SELECTOR[1..-1]).freeze
- + PERMISSION_SELECTOR_WATCHER = Array.new(PERMISSION_SELECTOR[1..1]).freeze
- # Values for the spaces_spaces relationships. This list will be added to.
- RELATION_NAMES = ['TRUSTS']
- @@ -221,6 +222,7 @@ class Space < ActiveRecord::Base
- self.can_apply = true if self.can_apply.nil?
- self.moderated = false if self.moderated.nil?
- self.wiki_format ||= HtmlFormat::FORMAT_HTML
- + self.watcher_permission_level = PERMISSION_VIEW
- self.name ||= 'New Space'
- end
- @@ -270,7 +272,7 @@ class Space < ActiveRecord::Base
- PERMISSION_SELECTOR_PUBLIC[idx..-1]
- end
- -
- +
- # return the correct permission level for a given user
- # this uses a set of rules which may be changed by subclasses
- # we need good unit tests for the cases that are implemented here
- @@ -299,17 +301,23 @@ class Space < ActiveRecord::Base
- rez = self.team_permissions
- role = UserRole::ROLE_MEMBER
- else
- - # role = UserRole::ROLE_WATCHER
- - rez = self.public_permissions
- +
- + if user_roles.detect{|ur| ur['role'].to_i >= UserRole::ROLE_WATCHER }
- + rez = self.watcher_permission_level
- + role = UserRole::ROLE_WATCHER
- + else
- + # role = UserRole::ROLE_WATCHER
- + rez = self.public_permissions
- + puts "REZ IS #{rez}"
- + end
- end
- end
- end
- -
- - # logger.debug("Space perms: #{name}, user:#{user.login}, perms:#{rez}")
- - user.set_permission(self.id, rez) #save it for later
- - user.set_role_cache(self.id, role)
- - rez
- - end
- + # logger.debug("Space perms: #{name}, user:#{user.login}, perms:#{rez}")
- + user.set_permission(self.id, rez) #save it for later
- + user.set_role_cache(self.id, role)
- + rez
- + end
- def small_user_roles user_id
- con = Space.connection
- @@ -487,12 +495,8 @@ AND (user_roles.space_id = #{con.quote self.id}
- else
- errors.add(:user_roles, _("%{fn} Cannot demote the only owner of the space"))
- end
- - when UserRole::ROLE_MEMBER
- - if self.public_permissions == PERMISSION_NONE
- - errors.add(:user_roles, _("%{fn} Cannot set user role to watcher when the space is set to private"))
- - else
- - user_role.role = UserRole::ROLE_WATCHER
- - end
- + when UserRole::ROLE_MEMBER
- + user_role.role = UserRole::ROLE_WATCHER
- end
- end
- user_role.save if errors.empty?
- diff --git a/app/views/spaces/_invitationform.rhtml b/app/views/spaces/_invitationform.rhtml
- index b783138..145aed0 100644
- --- a/app/views/spaces/_invitationform.rhtml
- +++ b/app/views/spaces/_invitationform.rhtml
- @@ -22,16 +22,21 @@
- <legend><%= _("Role")%>
- </legend>
- -
- - <% if params[:role] == UserRole::ROLE_OWNER
- - memberChecked = ""
- - ownerChecked = "checked"
- +
- + <%-
- + if params[:role] == UserRole::ROLE_OWNER
- + memberChecked = ""
- + ownerChecked = "checked"
- + elsif params[:role] == UserRole::ROLE_MEMBER
- + memberChecked = "checked"
- else
- - memberChecked = "checked"
- - end %>
- -
- - <label><input type="radio" id="rmember" name="role" value="<%= UserRole::ROLE_MEMBER %>" <%= memberChecked %>> <%= _("Member")%></label>
- - <label><input type="radio" id="rowner" name="role" value="<%= UserRole::ROLE_OWNER %>" <%= ownerChecked %>> <%= _("Owner")%></label>
- + watcherChecked = "checked"
- + end
- + -%>
- + <label><input type="radio" id="rowner" name="role" value="<%= UserRole::ROLE_OWNER %>" <%= ownerChecked %>> <%= _("Owner")%></label>
- + <label><input type="radio" id="rmember" name="role" value="<%= UserRole::ROLE_MEMBER %>" <%= memberChecked %>> <%= _("Member")%></label>
- + <label><input type="radio" id="rwatcher" name="role" value="<%= UserRole::ROLE_WATCHER %>" <%= watcherChecked %>> <%= _("Watcher")%></label>
- +
- </fieldset>
- diff --git a/app/views/spaces/admin/index.rhtml b/app/views/spaces/admin/index.rhtml
- index 929c4c7..5f4ae8c 100644
- --- a/app/views/spaces/admin/index.rhtml
- +++ b/app/views/spaces/admin/index.rhtml
- @@ -3,203 +3,209 @@
- <%= stylesheet_link_tag 'admin_upgrade' %>
- <div id="space_settings"></div>
- <% if is_site_admin? %>
- - <div style="text-align:right">
- - <%= link_to _("Admin Setting"), :action=>"admin" %>
- - </div>
- + <div style="text-align:right">
- + <%= link_to _("Admin Setting"), :action=>"admin" %>
- + </div>
- <% end %>
- <% if !@space.is_commercial? && @space.is_private? %>
- -<div class="summary-wrap-red">
- -
- -<div class="summary_section">
- - <div class="ico">
- - <a href="<%=url_for :action=>"security"%>" title="<%= _("Upgrade: More Details")%>">
- - <%= image_tag("admin/ico_admin-upgrade.gif",:border=>0) %>
- - </a>
- - </div>
- - <div class="more_link">
- - <%= link_to _("More"), :action=>"upgrade" %><span>></span>
- - </div>
- - <div class="summary_body main-features bg_red">
- + <div class="summary-wrap-red">
- +
- + <div class="summary_section">
- + <div class="ico">
- + <a href="<%=url_for :action=>"security"%>" title="<%= _("Upgrade: More Details")%>">
- + <%= image_tag("admin/ico_admin-upgrade.gif",:border=>0) %>
- + </a>
- + </div>
- + <div class="more_link">
- + <%= link_to _("More"), :action=>"upgrade" %><span>></span>
- + </div>
- + <div class="summary_body main-features bg_red">
- <h1><a href="<%=url_for :action => "upgrade"%>" title="<%= _("Uprade: More Details")%>"><%= _('Upgrade')%></a></h1>
- - <p>
- - <%= _("You are an owner of this space, which is private and free.") %>.
- - <strong> Assembla is no longer supporting this configuration</strong> so you need to purchase an inexpensive paid subscription, or change your permissions to make this space publicly visible.
- - If you do not respond, we will set your space to read-only status, and you will be able to get your private information later. Thank you for selecting one of the options below.
- - </p>
- - <p>
- - <div class="mf-button">
- - <div id="mfbutton">
- - <div id="mfbtn-inner" style="white-space:nowrap">
- - <%= link_to("<em>" + image_tag("/images/upgrade-arrow-small.gif", :alt => _("Upgrade")) + _("Pay for this space and upgrade")+"</em>", make_private_space_path(@space), :method => :put) %>
- - </div>
- - </div>
- - </div>
- - <div class="mf-or-cancel"> <%=_("or") %> <%= link_to _("Make this space public"), make_public_space_path(@space), :method => :put%></div>
- - </p>
- - </div>
- + <p>
- + <%= _("You are an owner of this space, which is private and free.") %>.
- + <strong> Assembla is no longer supporting this configuration</strong> so you need to purchase an inexpensive paid subscription, or change your permissions to make this space publicly visible.
- + If you do not respond, we will set your space to read-only status, and you will be able to get your private information later. Thank you for selecting one of the options below.
- + </p>
- + <p>
- + <div class="mf-button">
- + <div id="mfbutton">
- + <div id="mfbtn-inner" style="white-space:nowrap">
- + <%= link_to("<em>" + image_tag("/images/upgrade-arrow-small.gif", :alt => _("Upgrade")) + _("Pay for this space and upgrade")+"</em>", make_private_space_path(@space), :method => :put) %>
- + </div>
- + </div>
- + </div>
- + <div class="mf-or-cancel"> <%=_("or") %> <%= link_to _("Make this space public"), make_public_space_path(@space), :method => :put%></div>
- + </p>
- + </div>
- -</div>
- + </div>
- -<div class="cut"></div>
- + <div class="cut"></div>
- -</div>
- + </div>
- <%end%>
- <div class="summary-wrap">
- -<div class="summary_section">
- - <div class="ico">
- - <a href="<%=url_for :action=>"tools"%>" title="<%= _("Tools: More Details")%>">
- - <%= image_tag("admin/ico_admin-tools.gif",:border=>0) %>
- - </a>
- - </div>
- - <div class="more_link">
- - <%= link_to _("More"), :action=>"tools" %><span>></span>
- - </div>
- - <div class="summary_body">
- - <h1><a href="<%=url_for :action=>"tools"%>" title="<%= _("Tools: More Details")%>"><%= _("Tools")%></a></h1>
- - <p><%= _("Configure or Install new")%> <strong><%= _("On-Demand Tools")%></strong></p>
- - <p style="margin-top:5px">
- - <strong><%= _("Installed Tools")%>:</strong>
- + <div class="summary_section">
- + <div class="ico">
- + <a href="<%=url_for :action=>"tools"%>" title="<%= _("Tools: More Details")%>">
- + <%= image_tag("admin/ico_admin-tools.gif",:border=>0) %>
- + </a>
- + </div>
- + <div class="more_link">
- + <%= link_to _("More"), :action=>"tools" %><span>></span>
- + </div>
- + <div class="summary_body">
- + <h1><a href="<%=url_for :action=>"tools"%>" title="<%= _("Tools: More Details")%>"><%= _("Tools")%></a></h1>
- + <p><%= _("Configure or Install new")%> <strong><%= _("On-Demand Tools")%></strong></p>
- + <p style="margin-top:5px">
- + <strong><%= _("Installed Tools")%>:</strong>
- <%if @installed_tools.empty? %>
- - <em><%= _("You don't have any tools yet")%></em>
- - </p>
- - <%else%>
- - </p>
- - <ul id="tool_list">
- - <% @installed_tools.each do |t| %>
- - <li><%= tool_full_title(t) %></li>
- - <% end %>
- - </ul>
- - <%end%>
- - </div>
- -
- -</div>
- -
- -<div class="cut"></div>
- + <em><%= _("You don't have any tools yet")%></em>
- + </p>
- + <%else%>
- + </p>
- + <ul id="tool_list">
- + <% @installed_tools.each do |t| %>
- + <li><%= tool_full_title(t) %></li>
- + <% end %>
- + </ul>
- + <%end%>
- + </div>
- +
- + </div>
- +
- + <div class="cut"></div>
- </div>
- <div class="summary-wrap">
- -<div class="summary_section">
- - <div class="ico">
- - <a href="<%=url_for :action=>"security"%>" title="<%= _("Security: More Details")%>">
- - <%= image_tag("admin/ico_admin-access.gif",:border=>0) %>
- - </a>
- - </div>
- - <div class="more_link">
- - <%= link_to _("More"), :action=>"security" %><span>></span>
- - </div>
- - <div class="summary_body">
- -
- - <% form_tag space_path(@edit), :method=>:put do%>
- -<h1><a href="<%=url_for :action=>"security"%>" title="<%= _("Security: More Details")%>">
- - <%= _("Security")%>
- - </a></h1>
- -
- - <p>
- - <strong><%= _("Non-member access")%>:</strong>
- - <label class="inline"><%= _("Allow")%> <%= select 'space', 'public_permissions', @space.public_permission_selector(true), {}, {:style=>"width:75px",
- - :onchange=> "javascript:"+remote_function(:url => space_path(@space), :method=>:put,
- - :with => 'Form.Element.serialize(this)')} %> <%= _("for public access")%>.</label>
- - </p>
- - <p>
- - <strong><%= _("Member access")%>:</strong>
- - <label class="inline"><%= _("Allow")%> <%= select 'space', 'team_permissions', Space::PERMISSION_SELECTOR_TEAM, {}, {:style=>"width:75px",
- - :onchange=> "javascript:"+remote_function(:url => space_path(@space), :method=>:put,
- - :with => 'Form.Element.serialize(this)')} %> <%= _("for team member access")%>.</label>
- - </p>
- - <%if !@space.is_commercial? %>
- - <p style="font-size:smaller">
- - <%= _("You can't set the")%> <strong> <%= _("Non-member access")%></strong> <%= _("to")%> <strong> <%= _("None")%> </strong> <%= _("because your space is not Commercial")%>.
- - <%= _("If you want to have a private space you will need to")%> <%= link_to _("upgrade"), :action=>"upgrade"%>.
- - </p>
- - <%end%>
- - <%end%>
- - </div>
- + <div class="summary_section">
- + <div class="ico">
- + <a href="<%=url_for :action=>"security"%>" title="<%= _("Security: More Details")%>">
- + <%= image_tag("admin/ico_admin-access.gif",:border=>0) %>
- + </a>
- + </div>
- + <div class="more_link">
- + <%= link_to _("More"), :action=>"security" %><span>></span>
- + </div>
- + <div class="summary_body">
- +
- + <% form_tag space_path(@edit), :method=>:put do%>
- + <h1><a href="<%=url_for :action=>"security"%>" title="<%= _("Security: More Details")%>">
- + <%= _("Security")%>
- + </a></h1>
- +
- + <p>
- + <strong><%= _("Non-member access")%>:</strong>
- + <label class="inline"><%= _("Allow")%> <%= select 'space', 'public_permissions', @space.public_permission_selector(true), {}, {:style=>"width:75px",
- + :onchange=> "javascript:"+remote_function(:url => space_path(@space), :method=>:put,
- + :with => 'Form.Element.serialize(this)')} %> <%= _("for public access")%>.</label>
- + </p>
- + <p>
- + <strong><%= _("Watcher access:")%>:</strong>
- + <label class="inline"><%= _("Allow")%> <%= select 'space', 'watcher_permission_level', Space::PERMISSION_SELECTOR_WATCHER, {}, {:style=>"width:75px",
- + :onchange=> "javascript:"+remote_function(:url => space_path(@space), :method=>:put,
- + :with => 'Form.Element.serialize(this)')} %> <%= _("for watcher access")%>.</label>
- + </p>
- + <p>
- + <strong><%= _("Team Member access")%>:</strong>
- + <label class="inline"><%= _("Allow")%> <%= select 'space', 'team_permissions', Space::PERMISSION_SELECTOR_TEAM, {}, {:style=>"width:75px",
- + :onchange=> "javascript:"+remote_function(:url => space_path(@space), :method=>:put,
- + :with => 'Form.Element.serialize(this)')} %> <%= _("for team member access")%>.</label>
- + </p>
- + <%if !@space.is_commercial? %>
- + <p style="font-size:smaller">
- + <%= _("You can't set the")%> <strong> <%= _("Non-member access")%></strong> <%= _("to")%> <strong> <%= _("None")%> </strong> <%= _("because your space is not Commercial")%>.
- + <%= _("If you want to have a private space you will need to")%> <%= link_to _("upgrade"), :action=>"upgrade"%>.
- + </p>
- + <%end%>
- + <%end%>
- + </div>
- -</div>
- + </div>
- -<div class="cut"></div>
- + <div class="cut"></div>
- </div>
- <div class="summary-wrap">
- -<div class="summary_section">
- - <div class="ico">
- - <a href="<%=url_for :action=>"resources"%>" title="<%= _("Resources: More Details")%>">
- - <%= image_tag("admin/ico_admin-resources.gif",:border=>0) %>
- - </a>
- - </div>
- - <div class="more_link">
- - <%= link_to _("More"), :action=>"resources" %><span>></span>
- - </div>
- - <div class="summary_body">
- - <h1><a href="<%=url_for :action=>"resources"%>" title="<%= _("Resources: More Details")%>"><%= _("Resources")%></a></h1>
- -
- - <%if @space.is_commercial? %>
- - <% if @space.payer %>
- - <p><strong><%= _("Payer")%>:</strong> <%= @space.payer.permissioned_name(logged_user) %></p>
- - <%end%>
- - <p>
- - <strong><%= _("Disk Space Usage")%>:</strong> <%=number_to_human_size(@total)%>
- - <span style="margin-left:50px"><strong>Team Size:</strong> <%= pluralize(@space.user_roles.count,"member","members")%></span>
- - </p>
- - <p><b><%= _("To get support")%></b>, <%= _("email")%> <a href='mailto:<%= UserSystem::CONFIG[:service_support_email] %>'><%= UserSystem::CONFIG[:service_support_email] %></a> <%= _("or call")%> <%= UserSystem::CONFIG[:service_support_phone] %></p>
- - <%else%>
- -
- - <% unless @no_billing %>
- - <p><strong><%= link_to _("Upgrade"), :action=>"upgrade"%></strong> <%= _("this space and get all the benefits of a")%> <strong> <%= _("Commercial")%> </strong> <%= _("space")%>: <%= _("Private Space, 5GB of disk space, Automatic external S3 Backup and")%> <%= link_to _("more") %>.</p>
- - <% end %>
- - <p> <strong><%= _("Disk Space Usage")%>:</strong> <%=number_to_human_size(@total)%> of <%= quota_limit_color @total, @space.max_disk_quota %> </p>
- - <%end%>
- - </div>
- + <div class="summary_section">
- + <div class="ico">
- + <a href="<%=url_for :action=>"resources"%>" title="<%= _("Resources: More Details")%>">
- + <%= image_tag("admin/ico_admin-resources.gif",:border=>0) %>
- + </a>
- + </div>
- + <div class="more_link">
- + <%= link_to _("More"), :action=>"resources" %><span>></span>
- + </div>
- + <div class="summary_body">
- + <h1><a href="<%=url_for :action=>"resources"%>" title="<%= _("Resources: More Details")%>"><%= _("Resources")%></a></h1>
- +
- + <%if @space.is_commercial? %>
- + <% if @space.payer %>
- + <p><strong><%= _("Payer")%>:</strong> <%= @space.payer.permissioned_name(logged_user) %></p>
- + <%end%>
- + <p>
- + <strong><%= _("Disk Space Usage")%>:</strong> <%=number_to_human_size(@total)%>
- + <span style="margin-left:50px"><strong>Team Size:</strong> <%= pluralize(@space.user_roles.count,"member","members")%></span>
- + </p>
- + <p><b><%= _("To get support")%></b>, <%= _("email")%> <a href='mailto:<%= UserSystem::CONFIG[:service_support_email] %>'><%= UserSystem::CONFIG[:service_support_email] %></a> <%= _("or call")%> <%= UserSystem::CONFIG[:service_support_phone] %></p>
- + <%else%>
- + <% unless @no_billing %>
- + <p><strong><%= link_to _("Upgrade"), :action=>"upgrade"%></strong> <%= _("this space and get all the benefits of a")%> <strong> <%= _("Commercial")%> </strong> <%= _("space")%>: <%= _("Private Space, 5GB of disk space, Automatic external S3 Backup and")%> <%= link_to _("more") %>.</p>
- + <% end %>
- + <p> <strong><%= _("Disk Space Usage")%>:</strong> <%=number_to_human_size(@total)%> of <%= quota_limit_color @total, @space.max_disk_quota %> </p>
- + <%end%>
- + </div>
- -</div>
- -<div class="cut"></div>
- + </div>
- +
- + <div class="cut"></div>
- </div>
- <div class="summary-wrap">
- -<div class="summary_section">
- - <div class="ico">
- - <a href="<%=url_for :action=>"general"%>" title="<%= _("General: More Details")%>">
- - <%= image_tag("admin/ico_admin-configure.gif",:border=>0) %>
- - </a>
- - </div>
- - <div class="more_link">
- - <%= link_to _("More"), :action=>"general" %><span>></span>
- - </div>
- - <div class="summary_body">
- - <h1><a href="<%=url_for :action=>"general"%>" title="<%= _("General: More Details")%>">General</a></h1>
- - <p><%= _("Change your space name, url or description")%>. <%= _("Configure the appearence of your site with your own stylesheet or with your company's banner") %>.</p>
- - </div>
- -
- -</div>
- -
- -<div class="cut"></div>
- + <div class="summary_section">
- + <div class="ico">
- + <a href="<%=url_for :action=>"general"%>" title="<%= _("General: More Details")%>">
- + <%= image_tag("admin/ico_admin-configure.gif",:border=>0) %>
- + </a>
- + </div>
- + <div class="more_link">
- + <%= link_to _("More"), :action=>"general" %><span>></span>
- + </div>
- + <div class="summary_body">
- + <h1><a href="<%=url_for :action=>"general"%>" title="<%= _("General: More Details")%>">General</a></h1>
- + <p><%= _("Change your space name, url or description")%>. <%= _("Configure the appearence of your site with your own stylesheet or with your company's banner") %>.</p>
- + </div>
- +
- + </div>
- +
- + <div class="cut"></div>
- </div>
- <br />
- <div id="delete_page">
- - <div id="buttonm">
- - <div id="btn-inner">
- - <%= link_to content_tag('em', image_tag("remove.gif") + _('Delete this space')), space_path(@space.id), :method => :delete,
- + <div id="buttonm">
- + <div id="btn-inner">
- + <%= link_to content_tag('em', image_tag("remove.gif") + _('Delete this space')), space_path(@space.id), :method => :delete,
- :confirm =>_("Are you sure you want to delete this Space?") %>
- - </div>
- - </div>
- + </div>
- + </div>
- - </div>
- +</div>
- - <span class="warning">
- - <strong><%= _("Warning")%>:</strong> <%= _("All your space and tools data will be lost if you remove your space")%>.
- +<span class="warning">
- + <strong><%= _("Warning")%>:</strong> <%= _("All your space and tools data will be lost if you remove your space")%>.
- - </span>
- +</span>
- @@ -207,6 +213,6 @@
- <!--
- <%=link_to(_("Delete this space")+"...", space_path(@space.id),
- - :method => :delete, :class => 'button',
- - :confirm =>_("Are you sure you want to delete this Space?")) %> <small><strong>Warning:</strong> All your space and tools data will be lost if you remove your space.</small>
- - -->
- + :method => :delete, :class => 'button',
- + :confirm =>_("Are you sure you want to delete this Space?")) %> <small><strong>Warning:</strong> All your space and tools data will be lost if you remove your space.</small>
- +-->
- diff --git a/app/views/spaces/admin/security.rhtml b/app/views/spaces/admin/security.rhtml
- index d8ff070..2b89138 100644
- --- a/app/views/spaces/admin/security.rhtml
- +++ b/app/views/spaces/admin/security.rhtml
- @@ -1,3 +1,4 @@
- +
- <div class="new-form">
- <div class="security-page">
- <% space_page_title _("Security") %>
- @@ -24,12 +25,19 @@
- </fieldset>
- <fieldset>
- - <h5><%= _("Member access")%></h5>
- + <h5><%= _("Team Member access")%></h5>
- <label><%= _("Allow")%> <%= select 'space', 'team_permissions', Space::PERMISSION_SELECTOR_TEAM, {}, {:style=>"width:75px"} %> <%= _("for team member access")%>.</label>
- <p class="tip"><%= _("Choose how members of your team will be able to access your space")%>.</p>
- </fieldset>
- <fieldset>
- + <h5><%= _("Watcher access")%></h5>
- + <label><%= _("Allow")%> <%= select 'space', 'watcher_permission_level', Space::PERMISSION_SELECTOR_WATCHER, {}, {:style=>"width:75px"} %> <%= _("for team member access")%>.</label>
- + <p class="tip"><%= _("Watchers can be customers or other observers")%>.</p>
- + </fieldset>
- +
- +
- + <fieldset>
- <legend><%= _("Allowed IP addresses to connect to space tools")%>.</legend>
- <%= text_area('space', 'allowed_ips', :rows => 4, :cols => 40)%>
- <p class="tip"><%= _("Enter one IP per line. (Commercial spaces only)")%></p>
- diff --git a/db/migrate/352_add_watcher_permission_level_to_spaces.rb b/db/migrate/352_add_watcher_permission_level_to_spaces.rb
- new file mode 100644
- index 0000000..76565f5
- --- /dev/null
- +++ b/db/migrate/352_add_watcher_permission_level_to_spaces.rb
- @@ -0,0 +1,9 @@
- +class AddWatcherPermissionLevelToSpaces < ActiveRecord::Migration
- + def self.up
- + add_column :spaces, :watcher_permission_level, :integer, :default => Space::PERMISSION_VIEW
- + end
- +
- + def self.down
- + remove_column :spaces, :watcher_permission_level
- + end
- +end
Add Comment
Please, Sign In to add comment