sufia-models 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generators/sufia/models/install_generator.rb +99 -0
- data/lib/generators/sufia/models/templates/config/clamav.rb +1 -0
- data/lib/generators/sufia/models/templates/config/mailboxer.rb +17 -0
- data/lib/generators/sufia/models/templates/config/redis.yml +6 -0
- data/lib/generators/sufia/models/templates/config/redis_config.rb +32 -0
- data/lib/generators/sufia/models/templates/config/resque_admin.rb +10 -0
- data/lib/generators/sufia/models/templates/config/resque_config.rb +5 -0
- data/lib/generators/sufia/models/templates/config/setup_mail.rb +3 -0
- data/lib/generators/sufia/models/templates/config/sufia.rb +81 -0
- data/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb +17 -0
- data/lib/generators/sufia/models/templates/migrations/add_avatars_to_users.rb +9 -0
- data/lib/generators/sufia/models/templates/migrations/add_groups_to_users.rb +11 -0
- data/lib/generators/sufia/models/templates/migrations/add_ldap_attrs_to_user.rb +27 -0
- data/lib/generators/sufia/models/templates/migrations/add_social_to_users.rb +13 -0
- data/lib/generators/sufia/models/templates/migrations/create_checksum_audit_logs.rb +20 -0
- data/lib/generators/sufia/models/templates/migrations/create_local_authorities.rb +50 -0
- data/lib/generators/sufia/models/templates/migrations/create_single_use_links.rb +12 -0
- data/lib/generators/sufia/models/templates/migrations/create_trophies.rb +10 -0
- data/lib/generators/sufia/models/templates/migrations/create_version_committers.rb +15 -0
- data/lib/sufia/models/jobs/batch_update_job.rb +2 -2
- data/lib/sufia/models/version.rb +1 -1
- metadata +21 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f262e81abc28d0f72840dbdc78a95e3b6d52b57
|
4
|
+
data.tar.gz: 1f94f581db6d3c3bdfe2b7853ae8835a14d884e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10168f401439a85afcd7cd6e99069f803a2541ed5558002403951082991c36016de287d8cdf37dec099bb5bb203a42310a8bad75f32c5c06059113cd2e2c8b6c
|
7
|
+
data.tar.gz: 55243f46216539e011da9fe4ccb69481394cc29c66459ea9b5599523526c95f1ffd14b80279f92524376c544a5eb3eae10f4eef1ece20e8a3fdf0eb69d135cdb
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'rails/generators'
|
3
|
+
require 'rails/generators/migration'
|
4
|
+
|
5
|
+
class Sufia::Models::InstallGenerator < Rails::Generators::Base
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
|
8
|
+
source_root File.expand_path('../templates', __FILE__)
|
9
|
+
|
10
|
+
argument :model_name, :type => :string , :default => "user"
|
11
|
+
desc """
|
12
|
+
This generator makes the following changes to your application:
|
13
|
+
1. Creates several database migrations if they do not exist in /db/migrate
|
14
|
+
2. Adds user behavior to the user model
|
15
|
+
3. Creates the sufia.rb configuration file
|
16
|
+
4. Adds Sufia::SolrDocumentBehavior to app/models/solr_document.rb
|
17
|
+
5. Generates mailboxer
|
18
|
+
"""
|
19
|
+
|
20
|
+
# Implement the required interface for Rails::Generators::Migration.
|
21
|
+
# taken from http://github.com/rails/rails/blob/master/activerecord/lib/generators/active_record.rb
|
22
|
+
def self.next_migration_number(path)
|
23
|
+
unless @prev_migration_nr
|
24
|
+
@prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
|
25
|
+
else
|
26
|
+
@prev_migration_nr += 1
|
27
|
+
end
|
28
|
+
@prev_migration_nr.to_s
|
29
|
+
end
|
30
|
+
|
31
|
+
# Setup the database migrations
|
32
|
+
def copy_migrations
|
33
|
+
# Can't get this any more DRY, because we need this order.
|
34
|
+
[
|
35
|
+
"acts_as_follower_migration.rb",
|
36
|
+
"add_social_to_users.rb",
|
37
|
+
"create_single_use_links.rb",
|
38
|
+
"add_ldap_attrs_to_user.rb",
|
39
|
+
"add_avatars_to_users.rb",
|
40
|
+
"create_checksum_audit_logs.rb",
|
41
|
+
"create_version_committers.rb",
|
42
|
+
"add_groups_to_users.rb",
|
43
|
+
"create_local_authorities.rb",
|
44
|
+
"create_trophies.rb"
|
45
|
+
].each do |f|
|
46
|
+
better_migration_template f
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Add behaviors to the user model
|
51
|
+
def inject_sufia_user_behavior
|
52
|
+
file_path = "app/models/#{model_name.underscore}.rb"
|
53
|
+
if File.exists?(file_path)
|
54
|
+
inject_into_class file_path, model_name.classify do
|
55
|
+
"# Connects this user object to Sufia behaviors. " +
|
56
|
+
"\n include Sufia::User\n"
|
57
|
+
end
|
58
|
+
else
|
59
|
+
puts " \e[31mFailure\e[0m Sufia requires a user object. This generators assumes that the model is defined in the file #{file_path}, which does not exist. If you used a different name, please re-run the generator and provide that name as an argument. Such as \b rails -g sufia client"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def create_configuration_files
|
64
|
+
copy_file "config/sufia.rb", "config/initializers/sufia.rb"
|
65
|
+
copy_file "config/redis.yml", "config/redis.yml"
|
66
|
+
copy_file "config/redis_config.rb", "config/initializers/redis_config.rb"
|
67
|
+
copy_file "config/resque_admin.rb", "config/initializers/resque_admin.rb"
|
68
|
+
copy_file "config/resque_config.rb", "config/initializers/resque_config.rb"
|
69
|
+
end
|
70
|
+
|
71
|
+
# Add behaviors to the SolrDocument model
|
72
|
+
def inject_sufia_solr_document_behavior
|
73
|
+
file_path = "app/models/solr_document.rb"
|
74
|
+
if File.exists?(file_path)
|
75
|
+
inject_into_class file_path, "SolrDocument" do
|
76
|
+
" # Adds Sufia behaviors to the SolrDocument.\n" +
|
77
|
+
" include Sufia::SolrDocumentBehavior\n"
|
78
|
+
end
|
79
|
+
else
|
80
|
+
puts " \e[31mFailure\e[0m Sufia requires a SolrDocument object. This generators assumes that the model is defined in the file #{file_path}, which does not exist."
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def install_mailboxer
|
85
|
+
generate "mailboxer:install"
|
86
|
+
end
|
87
|
+
|
88
|
+
private
|
89
|
+
|
90
|
+
def better_migration_template(file)
|
91
|
+
begin
|
92
|
+
migration_template "migrations/#{file}", "db/migrate/#{file}"
|
93
|
+
sleep 1 # ensure scripts have different time stamps
|
94
|
+
rescue
|
95
|
+
puts " \e[1m\e[34mMigrations\e[0m " + $!.message
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
ClamAV.instance.loaddb() if defined? ClamAV
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Mailboxer.setup do |config|
|
2
|
+
|
3
|
+
#Configures if you applications uses or no the email sending for Notifications and Messages
|
4
|
+
config.uses_emails = true
|
5
|
+
|
6
|
+
#Configures the default from for the email sent for Messages and Notifications of Mailboxer
|
7
|
+
config.default_from = "no-reply@mailboxer.com"
|
8
|
+
|
9
|
+
#Configures the methods needed by mailboxer
|
10
|
+
config.email_method = :mailboxer_email
|
11
|
+
config.name_method = :name
|
12
|
+
|
13
|
+
#Configures if you use or not a search engine and wich one are you using
|
14
|
+
#Supported enignes: [:solr,:sphinx]
|
15
|
+
config.search_enabled = false
|
16
|
+
config.search_engine = :solr
|
17
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
if defined?(PhusionPassenger)
|
2
|
+
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
3
|
+
# We're in smart spawning mode.
|
4
|
+
if forked
|
5
|
+
# Re-establish redis connection
|
6
|
+
require 'redis'
|
7
|
+
config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
|
8
|
+
|
9
|
+
# The important two lines
|
10
|
+
$redis.client.disconnect if $redis
|
11
|
+
$redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true) rescue nil
|
12
|
+
Resque.redis = $redis
|
13
|
+
Resque.redis.client.reconnect if Resque.redis
|
14
|
+
end
|
15
|
+
end
|
16
|
+
else
|
17
|
+
config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
|
18
|
+
$redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true) rescue nil
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
# Code borrowed from Obie's Redis patterns talk at RailsConf'12
|
23
|
+
Nest.class_eval do
|
24
|
+
def initialize(key, redis=$redis)
|
25
|
+
super(key.to_param)
|
26
|
+
@redis = redis
|
27
|
+
end
|
28
|
+
|
29
|
+
def [](key)
|
30
|
+
self.class.new("#{self}:#{key.to_param}", @redis)
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Sufia
|
2
|
+
class ResqueAdmin
|
3
|
+
def self.matches?(request)
|
4
|
+
current_user = request.env['warden'].user
|
5
|
+
return false if current_user.blank?
|
6
|
+
# TODO code a group here that makes sense
|
7
|
+
#current_user.groups.include? 'umg/up.dlt.scholarsphere-admin'
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
|
2
|
+
Resque.redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true)
|
3
|
+
|
4
|
+
Resque.inline = Rails.env.test?
|
5
|
+
Resque.redis.namespace = "#{Sufia.config.id_namespace}:#{Rails.env}"
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# Returns an array containing the vhost 'CoSign service' value and URL
|
2
|
+
Sufia.config do |config|
|
3
|
+
|
4
|
+
config.fits_to_desc_mapping= {
|
5
|
+
:file_title => :title,
|
6
|
+
:file_author => :creator
|
7
|
+
}
|
8
|
+
|
9
|
+
# Specify a different template for your repositories unique identifiers
|
10
|
+
# config.noid_template = ".reeddeeddk"
|
11
|
+
|
12
|
+
config.max_days_between_audits = 7
|
13
|
+
|
14
|
+
config.cc_licenses = {
|
15
|
+
'Attribution 3.0 United States' => 'http://creativecommons.org/licenses/by/3.0/us/',
|
16
|
+
'Attribution-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-sa/3.0/us/',
|
17
|
+
'Attribution-NonCommercial 3.0 United States' => 'http://creativecommons.org/licenses/by-nc/3.0/us/',
|
18
|
+
'Attribution-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nd/3.0/us/',
|
19
|
+
'Attribution-NonCommercial-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-nd/3.0/us/',
|
20
|
+
'Attribution-NonCommercial-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/us/',
|
21
|
+
'Public Domain Mark 1.0' => 'http://creativecommons.org/publicdomain/mark/1.0/',
|
22
|
+
'CC0 1.0 Universal' => 'http://creativecommons.org/publicdomain/zero/1.0/',
|
23
|
+
'All rights reserved' => 'All rights reserved'
|
24
|
+
}
|
25
|
+
|
26
|
+
config.cc_licenses_reverse = Hash[*config.cc_licenses.to_a.flatten.reverse]
|
27
|
+
|
28
|
+
config.resource_types = {
|
29
|
+
"Article" => "Article",
|
30
|
+
"Audio" => "Audio",
|
31
|
+
"Book" => "Book",
|
32
|
+
"Capstone Project" => "Capstone Project",
|
33
|
+
"Conference Proceeding" => "Conference Proceeding",
|
34
|
+
"Dataset" => "Dataset",
|
35
|
+
"Dissertation" => "Dissertation",
|
36
|
+
"Image" => "Image",
|
37
|
+
"Journal" => "Journal",
|
38
|
+
"Map or Cartographic Material" => "Map or Cartographic Material",
|
39
|
+
"Masters Thesis" => "Masters Thesis",
|
40
|
+
"Part of Book" => "Part of Book",
|
41
|
+
"Poster" => "Poster",
|
42
|
+
"Presentation" => "Presentation",
|
43
|
+
"Project" => "Project",
|
44
|
+
"Report" => "Report",
|
45
|
+
"Research Paper" => "Research Paper",
|
46
|
+
"Software or Program Code" => "Software or Program Code",
|
47
|
+
"Video" => "Video",
|
48
|
+
"Other" => "Other",
|
49
|
+
}
|
50
|
+
|
51
|
+
config.permission_levels = {
|
52
|
+
"Choose Access"=>"none",
|
53
|
+
"View/Download" => "read",
|
54
|
+
"Edit" => "edit"
|
55
|
+
}
|
56
|
+
|
57
|
+
config.owner_permission_levels = {
|
58
|
+
"Edit" => "edit"
|
59
|
+
}
|
60
|
+
|
61
|
+
config.queue = Sufia::Resque::Queue
|
62
|
+
|
63
|
+
# Map hostnames onto Google Analytics tracking IDs
|
64
|
+
# config.google_analytics_id = 'UA-99999999-1'
|
65
|
+
|
66
|
+
|
67
|
+
# Where to store tempfiles, leave blank for the system temp directory (e.g. /tmp)
|
68
|
+
# config.temp_file_base = '/home/developer1'
|
69
|
+
|
70
|
+
# If you have ffmpeg installed and want to transcode audio and video uncomment this line
|
71
|
+
# config.enable_ffmpeg = true
|
72
|
+
|
73
|
+
# Specify the Fedora pid prefix:
|
74
|
+
# config.id_namespace = "sufia"
|
75
|
+
|
76
|
+
# Specify the path to the file characterization tool:
|
77
|
+
# config.fits_path = "fits.sh"
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class ActsAsFollowerMigration < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :follows, :force => true do |t|
|
4
|
+
t.references :followable, :polymorphic => true, :null => false
|
5
|
+
t.references :follower, :polymorphic => true, :null => false
|
6
|
+
t.boolean :blocked, :default => false, :null => false
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
|
10
|
+
add_index :follows, ["follower_id", "follower_type"], :name => "fk_follows"
|
11
|
+
add_index :follows, ["followable_id", "followable_type"], :name => "fk_followables"
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :follows
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddGroupsToUsers < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :users, :group_list, :text
|
4
|
+
add_column :users, :groups_last_update, :datetime
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :users, :group_list
|
9
|
+
remove_column :users, :groups_last_update
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class AddLdapAttrsToUser < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :users, :display_name, :string
|
4
|
+
add_column :users, :address, :string
|
5
|
+
add_column :users, :admin_area, :string
|
6
|
+
add_column :users, :department, :string
|
7
|
+
add_column :users, :title, :string
|
8
|
+
add_column :users, :office, :string
|
9
|
+
add_column :users, :chat_id, :string
|
10
|
+
add_column :users, :website, :string
|
11
|
+
add_column :users, :affiliation, :string
|
12
|
+
add_column :users, :telephone, :string
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
remove_column :users, :display_name
|
17
|
+
remove_column :users, :address
|
18
|
+
remove_column :users, :admin_area
|
19
|
+
remove_column :users, :department
|
20
|
+
remove_column :users, :title
|
21
|
+
remove_column :users, :office
|
22
|
+
remove_column :users, :chat_id
|
23
|
+
remove_column :users, :website
|
24
|
+
remove_column :users, :affiliation
|
25
|
+
remove_column :users, :telephone
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddSocialToUsers < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :users, :facebook_handle, :string
|
4
|
+
add_column :users, :twitter_handle, :string
|
5
|
+
add_column :users, :googleplus_handle, :string
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :users, :facebook_handle, :string
|
10
|
+
remove_column :users, :twitter_handle, :string
|
11
|
+
remove_column :users, :googleplus_handle, :string
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CreateChecksumAuditLogs < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :checksum_audit_logs do |t|
|
4
|
+
t.string :pid
|
5
|
+
t.string :dsid
|
6
|
+
t.string :version
|
7
|
+
t.integer :pass
|
8
|
+
t.string :expected_result
|
9
|
+
t.string :actual_result
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
add_index :checksum_audit_logs, [:pid, :dsid], :name=>'by_pid_and_dsid', :order => {:created_at => "DESC" }
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.down
|
17
|
+
remove_index(:checksum_audit_logs, :name => 'by_pid_and_dsid')
|
18
|
+
drop_table :checksum_audit_logs
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
class CreateLocalAuthorities < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :local_authority_entries, :force => true do |t|
|
4
|
+
t.integer :local_authority_id
|
5
|
+
t.string :label
|
6
|
+
t.string :uri
|
7
|
+
end
|
8
|
+
|
9
|
+
create_table :local_authorities, :force => true do |t|
|
10
|
+
t.string :name, :unique => true
|
11
|
+
end
|
12
|
+
|
13
|
+
create_table :domain_terms, :force => true do |t|
|
14
|
+
t.string :model
|
15
|
+
t.string :term
|
16
|
+
end
|
17
|
+
|
18
|
+
create_table :domain_terms_local_authorities, :id => false do |t|
|
19
|
+
t.integer :domain_term_id, :foreign_key => true
|
20
|
+
t.integer :local_authority_id, :foreign_key => true
|
21
|
+
end
|
22
|
+
|
23
|
+
create_table :subject_local_authority_entries, :force => true do |t|
|
24
|
+
t.string :label
|
25
|
+
t.string :lowerLabel
|
26
|
+
t.string :url
|
27
|
+
end
|
28
|
+
|
29
|
+
add_index :local_authority_entries, [:local_authority_id, :label], :name => 'entries_by_term_and_label'
|
30
|
+
add_index :local_authority_entries, [:local_authority_id, :uri], :name => 'entries_by_term_and_uri'
|
31
|
+
add_index :domain_terms, [:model, :term], :name => 'terms_by_model_and_term'
|
32
|
+
add_index :domain_terms_local_authorities, [:local_authority_id, :domain_term_id], :name => 'dtla_by_ids1'
|
33
|
+
add_index :domain_terms_local_authorities, [:domain_term_id, :local_authority_id], :name => 'dtla_by_ids2'
|
34
|
+
add_index :subject_local_authority_entries, [:lowerLabel], :name => 'entries_by_lower_label'
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.down
|
38
|
+
drop_table :local_authority_entries
|
39
|
+
drop_table :local_authorities
|
40
|
+
drop_table :domain_terms
|
41
|
+
drop_table :domain_terms_local_authorities
|
42
|
+
drop_table :subject_local_authority_entries
|
43
|
+
remove_index :local_authority_entries, :name => "entries_by_term_and_label"
|
44
|
+
remove_index :local_authority_entries, :name => "entries_by_term_and_uri"
|
45
|
+
remove_index :domain_terms, :name => "terms_by_model_and_term"
|
46
|
+
remove_index :subject_local_authority_entries, :name => 'entries_by_lower_label'
|
47
|
+
remove_index :domain_terms_local_authorities, :name => 'dtla_by_ids1'
|
48
|
+
remove_index :domain_terms_local_authorities, :name => 'dtla_by_ids2'
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateVersionCommitters < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :version_committers do |t|
|
4
|
+
t.string :obj_id
|
5
|
+
t.string :datastream_id
|
6
|
+
t.string :version_id
|
7
|
+
t.string :committer_login
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
drop_table :version_committers
|
14
|
+
end
|
15
|
+
end
|
@@ -44,10 +44,10 @@ class BatchUpdateJob
|
|
44
44
|
|
45
45
|
job_user = User.batchuser()
|
46
46
|
|
47
|
-
message = '<
|
47
|
+
message = '<span class="batchid ui-helper-hidden">ss-'+batch.noid+'</span>The file(s) '+ file_list(@saved)+ " have been saved." unless @saved.empty?
|
48
48
|
job_user.send_message(user, message, 'Batch upload complete') unless @saved.empty?
|
49
49
|
|
50
|
-
message = '<
|
50
|
+
message = '<span class="batchid ui-helper-hidden">'+batch.noid+'</span>The file(s) '+ file_list(@denied)+" could not be updated. You do not have sufficient privileges to edit it." unless @denied.empty?
|
51
51
|
job_user.send_message(user, message, 'Batch upload permission denied') unless @denied.empty?
|
52
52
|
|
53
53
|
end
|
data/lib/sufia/models/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sufia-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -258,6 +258,25 @@ files:
|
|
258
258
|
- app/models/trophy.rb
|
259
259
|
- app/models/version_committer.rb
|
260
260
|
- config/locales/sufia.en.yml
|
261
|
+
- lib/generators/sufia/models/install_generator.rb
|
262
|
+
- lib/generators/sufia/models/templates/config/clamav.rb
|
263
|
+
- lib/generators/sufia/models/templates/config/mailboxer.rb
|
264
|
+
- lib/generators/sufia/models/templates/config/redis.yml
|
265
|
+
- lib/generators/sufia/models/templates/config/redis_config.rb
|
266
|
+
- lib/generators/sufia/models/templates/config/resque_admin.rb
|
267
|
+
- lib/generators/sufia/models/templates/config/resque_config.rb
|
268
|
+
- lib/generators/sufia/models/templates/config/setup_mail.rb
|
269
|
+
- lib/generators/sufia/models/templates/config/sufia.rb
|
270
|
+
- lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
|
271
|
+
- lib/generators/sufia/models/templates/migrations/add_avatars_to_users.rb
|
272
|
+
- lib/generators/sufia/models/templates/migrations/add_groups_to_users.rb
|
273
|
+
- lib/generators/sufia/models/templates/migrations/add_ldap_attrs_to_user.rb
|
274
|
+
- lib/generators/sufia/models/templates/migrations/add_social_to_users.rb
|
275
|
+
- lib/generators/sufia/models/templates/migrations/create_checksum_audit_logs.rb
|
276
|
+
- lib/generators/sufia/models/templates/migrations/create_local_authorities.rb
|
277
|
+
- lib/generators/sufia/models/templates/migrations/create_single_use_links.rb
|
278
|
+
- lib/generators/sufia/models/templates/migrations/create_trophies.rb
|
279
|
+
- lib/generators/sufia/models/templates/migrations/create_version_committers.rb
|
261
280
|
- lib/sufia/models.rb
|
262
281
|
- lib/sufia/models/active_fedora/redis.rb
|
263
282
|
- lib/sufia/models/active_record/redis.rb
|