faalis 1.0.0.alpha4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/faalis/angular-manifest.js +1 -0
- data/app/assets/javascripts/faalis/dashboard/app.js +1 -2
- data/app/assets/javascripts/faalis/dashboard/controllers/group.js.coffee +9 -7
- data/app/assets/javascripts/faalis/dashboard/controllers/user.js +11 -0
- data/app/assets/javascripts/faalis/dashboard/functions.js.erb +36 -0
- data/app/assets/javascripts/faalis/dashboard/lib/controllers/generic_index_controller.js.coffee +13 -6
- data/app/assets/javascripts/faalis/dashboard/lib/fields/has_many_field.js.coffee +0 -2
- data/app/assets/javascripts/faalis/dashboard/lib/resource.js.coffee +17 -4
- data/app/assets/javascripts/faalis/dashboard/modules/auth/user.js +0 -96
- data/app/assets/javascripts/faalis/dashboard/modules/fake.js +41 -0
- data/app/assets/javascripts/faalis/dashboard/modules/fields/datetime.js +4 -1
- data/app/assets/javascripts/faalis/dashboard/resources/group_resource.js.coffee +1 -0
- data/app/assets/javascripts/faalis/dashboard/resources/user_resource.js.coffee +0 -0
- data/app/assets/javascripts/faalis/dashboard/services/api.js.coffee +8 -6
- data/app/assets/javascripts/faalis/dashboard/services/user.js.coffee +0 -4
- data/app/assets/javascripts/faalis/dashboard/variables.js.erb +2 -1
- data/app/assets/stylesheets/faalis/dashboard/ltr/application.css +4 -2
- data/app/assets/stylesheets/faalis/dashboard/rtl/application.css +2 -0
- data/app/controllers/faalis/api/v1/permissions_controller.rb +2 -1
- data/app/controllers/faalis/api_controller.rb +0 -3
- data/app/controllers/faalis/application_controller.rb +3 -0
- data/app/controllers/faalis/dashboard/groups_controller.rb +80 -0
- data/app/controllers/faalis/dashboard/users_controller.rb +100 -0
- data/app/controllers/faalis/dashboard_controller.rb +5 -1
- data/app/helpers/faalis/users_helper.rb +4 -0
- data/app/models/faalis/concerns/user/permission.rb +5 -0
- data/app/models/faalis/group.rb +14 -0
- data/app/models/faalis/permission.rb +3 -0
- data/app/views/angular/auth/groups/details.html +2 -21
- data/app/views/angular/auth/groups/index.html +2 -5
- data/app/views/angular/auth/groups/new.html +2 -47
- data/app/views/faalis/api/v1/groups/index.json.jbuilder +4 -4
- data/app/views/faalis/api/v1/permissions/index.json.jbuilder +1 -1
- data/app/views/faalis/dashboard/groups/_form.html.slim +72 -0
- data/app/views/faalis/dashboard/groups/create.js.erb +3 -0
- data/app/views/faalis/dashboard/groups/edit.html.slim +3 -0
- data/app/views/faalis/dashboard/groups/errors.js.erb +3 -0
- data/app/views/faalis/dashboard/groups/new.html.slim +2 -0
- data/app/views/faalis/dashboard/groups/update.js.erb +3 -0
- data/app/views/faalis/dashboard/users/_form.html.slim +80 -0
- data/app/views/faalis/dashboard/users/_password_form.html.slim +37 -0
- data/app/views/faalis/dashboard/users/create.js.erb +3 -0
- data/app/views/faalis/dashboard/users/edit.html.slim +3 -0
- data/app/views/faalis/dashboard/users/edit_password.html.slim +1 -0
- data/app/views/faalis/dashboard/users/errors.js.erb +3 -0
- data/app/views/faalis/dashboard/users/index.html.slim +67 -0
- data/app/views/faalis/dashboard/users/new.html.slim +2 -0
- data/app/views/faalis/dashboard/users/show.html.slim +6 -0
- data/app/views/faalis/dashboard/users/update.js.erb +3 -0
- data/app/views/faalis/dashboard/users/update_password.js.erb +3 -0
- data/db/migrate/20131013091000_devise_create_faalis_users.rb +0 -3
- data/lib/faalis.rb +2 -0
- data/lib/faalis/action_dispatch.rb +3 -0
- data/lib/faalis/configuration.rb +25 -0
- data/lib/faalis/engine.rb +2 -0
- data/lib/faalis/fake_assets.rb +1 -0
- data/lib/faalis/route.rb +73 -2
- data/lib/faalis/version.rb +3 -3
- data/lib/faalis_application.rb +10 -6
- data/lib/faalis_plugin.rb +5 -4
- data/lib/generators/faalis/install_generator.rb +1 -0
- data/lib/generators/faalis/js/list_view_generator.rb +4 -0
- data/lib/generators/faalis/scaffold_generator.rb +98 -72
- data/lib/generators/faalis/templates/angularjs/new.html.erb +10 -10
- data/lib/generators/faalis/templates/js/list_view/new.html.erb +10 -10
- data/lib/generators/faalis/templates/js/list_view/partials/add_controller.js.erb +4 -4
- data/lib/generators/faalis/templates/js/list_view/partials/config.js.erb +11 -8
- data/lib/generators/faalis/templates/js/list_view/partials/index_controller.js.erb +5 -5
- data/lib/generators/faalis/templates/policy/application_policy.rb +2 -0
- data/lib/generators/faalis/templates/policy/policy.rb.erb +2 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/{20150121060012_create_application_models.model_discovery_engine.rb → 20150723215115_create_application_models.model_discovery_engine.rb} +0 -0
- data/spec/dummy/db/migrate/20150725103007_devise_create_faalis_users.faalis.rb +63 -0
- data/spec/dummy/db/migrate/20150725103008_create_faalis_groups.faalis.rb +13 -0
- data/spec/dummy/db/migrate/20150725103009_create_faalis_permissions.faalis.rb +13 -0
- data/spec/dummy/db/migrate/20150725103010_add_permissions_groups_table.faalis.rb +9 -0
- data/spec/dummy/db/migrate/20150725103011_add_users_groups_table.faalis.rb +9 -0
- data/spec/dummy/db/schema.rb +5 -2
- data/spec/dummy/db/seeds.rb +1 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +6474 -466
- data/spec/dummy/log/test.log +23493 -9554
- data/spec/dummy/tmp/app/assets/javascripts/controlpanel/application.js +22 -0
- data/spec/dummy/tmp/app/assets/stylesheets/dashboard/ltr/application.css +3 -0
- data/spec/dummy/tmp/app/assets/stylesheets/dashboard/rtl/application.css +3 -0
- data/spec/dummy/tmp/app/assets/stylesheets/ltr/application.css +3 -0
- data/spec/dummy/tmp/app/assets/stylesheets/rtl/application.css +3 -0
- data/spec/dummy/tmp/app/controllers/api_controller.rb +2 -0
- data/spec/dummy/tmp/app/controllers/application_controller.rb +0 -0
- data/spec/dummy/tmp/app/policies/application_policy.rb +2 -0
- data/spec/dummy/tmp/config/initializers/devise.rb +251 -0
- data/spec/dummy/tmp/config/initializers/faalis.rb +13 -0
- data/spec/dummy/tmp/config/initializers/fast_gettext.rb +4 -0
- data/spec/dummy/tmp/config/initializers/formstatic.rb +76 -0
- data/spec/dummy/tmp/config/routes.rb +0 -0
- data/spec/dummy/tmp/db/seeds.rb +1 -0
- metadata +73 -7
@@ -0,0 +1,22 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
/// From Faalis -----------------------------
|
14
|
+
//= require faalis/dashboard/application
|
15
|
+
|
16
|
+
//= require dashstrap/application
|
17
|
+
|
18
|
+
//= require AdminLTE/app
|
19
|
+
//= require AdminLTE/dashboard
|
20
|
+
|
21
|
+
/// Faalis dashboard main application --------
|
22
|
+
//= require faalis/dashboard/application
|
File without changes
|
@@ -0,0 +1,251 @@
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
|
+
# Many of these configuration options can be set straight in your model.
|
3
|
+
Devise.setup do |config|
|
4
|
+
# The secret key used by Devise. Devise uses this key to generate
|
5
|
+
# random tokens. Changing this key will render invalid all existing
|
6
|
+
# confirmation, reset password and unlock tokens in the database.
|
7
|
+
config.secret_key = '1bbe0b5a272a1500d8d4fb5e2cb1be3b7025a097bf3d8c89c39085c03cf1401e45997ca1e25f527863d4f30ed17a38a397abdf154e9cfac24dd0ccfb19ec3228'
|
8
|
+
|
9
|
+
# ==> Mailer Configuration
|
10
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
11
|
+
# note that it will be overwritten if you use your own mailer class
|
12
|
+
# with default "from" parameter.
|
13
|
+
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
14
|
+
|
15
|
+
# Configure the class responsible to send e-mails.
|
16
|
+
# config.mailer = 'Devise::Mailer'
|
17
|
+
|
18
|
+
# ==> ORM configuration
|
19
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
20
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
21
|
+
# available as additional gems.
|
22
|
+
require 'devise/orm/false'
|
23
|
+
|
24
|
+
# ==> Configuration for any authentication mechanism
|
25
|
+
# Configure which keys are used when authenticating a user. The default is
|
26
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
27
|
+
# authenticating a user, both parameters are required. Remember that those
|
28
|
+
# parameters are used only when authenticating and not when retrieving from
|
29
|
+
# session. If you need permissions, you should implement that in a before filter.
|
30
|
+
# You can also supply a hash where the value is a boolean determining whether
|
31
|
+
# or not authentication should be aborted when the value is not present.
|
32
|
+
# config.authentication_keys = [ :email ]
|
33
|
+
|
34
|
+
# Configure parameters from the request object used for authentication. Each entry
|
35
|
+
# given should be a request method and it will automatically be passed to the
|
36
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
37
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
38
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
39
|
+
# config.request_keys = []
|
40
|
+
|
41
|
+
# Configure which authentication keys should be case-insensitive.
|
42
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
43
|
+
# to authenticate or find a user. Default is :email.
|
44
|
+
config.case_insensitive_keys = [ :email ]
|
45
|
+
|
46
|
+
# Configure which authentication keys should have whitespace stripped.
|
47
|
+
# These keys will have whitespace before and after removed upon creating or
|
48
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
49
|
+
config.strip_whitespace_keys = [ :email ]
|
50
|
+
|
51
|
+
# Tell if authentication through request.params is enabled. True by default.
|
52
|
+
# It can be set to an array that will enable params authentication only for the
|
53
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
54
|
+
# enable it only for database (email + password) authentication.
|
55
|
+
# config.params_authenticatable = true
|
56
|
+
|
57
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
58
|
+
# It can be set to an array that will enable http authentication only for the
|
59
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
60
|
+
# enable it only for database authentication. The supported strategies are:
|
61
|
+
# :database = Support basic authentication with authentication key + password
|
62
|
+
# config.http_authenticatable = false
|
63
|
+
|
64
|
+
# If http headers should be returned for AJAX requests. True by default.
|
65
|
+
# config.http_authenticatable_on_xhr = true
|
66
|
+
|
67
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
68
|
+
# config.http_authentication_realm = 'Application'
|
69
|
+
|
70
|
+
# It will change confirmation, password recovery and other workflows
|
71
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
72
|
+
# Does not affect registerable.
|
73
|
+
# config.paranoid = true
|
74
|
+
|
75
|
+
# By default Devise will store the user in session. You can skip storage for
|
76
|
+
# particular strategies by setting this option.
|
77
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
78
|
+
# may want to disable generating routes to Devise's sessions controller by
|
79
|
+
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
80
|
+
config.skip_session_storage = [:http_auth]
|
81
|
+
|
82
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
83
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
84
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
85
|
+
# from the server. You can disable this option at your own risk.
|
86
|
+
# config.clean_up_csrf_token_on_authentication = true
|
87
|
+
|
88
|
+
# ==> Configuration for :database_authenticatable
|
89
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
90
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
91
|
+
#
|
92
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
93
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
94
|
+
# a value less than 10 in other environments.
|
95
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
96
|
+
|
97
|
+
# Setup a pepper to generate the encrypted password.
|
98
|
+
# config.pepper = '5eee25566c09ac9087d25d7767c76f752b93021d8c11de6ef4ef5c988eb88250d5e9ae4f45b90b71f2048266621c4ea4b9b70741b967b0ad493b9781627222d3'
|
99
|
+
|
100
|
+
# ==> Configuration for :confirmable
|
101
|
+
# A period that the user is allowed to access the website even without
|
102
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
103
|
+
# able to access the website for two days without confirming his account,
|
104
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
105
|
+
# the user cannot access the website without confirming his account.
|
106
|
+
# config.allow_unconfirmed_access_for = 2.days
|
107
|
+
|
108
|
+
# A period that the user is allowed to confirm their account before their
|
109
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
110
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
111
|
+
# their account can't be confirmed with the token any more.
|
112
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
113
|
+
# before confirming their account.
|
114
|
+
# config.confirm_within = 3.days
|
115
|
+
|
116
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
117
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
118
|
+
# db field (see migrations). Until confirmed new email is stored in
|
119
|
+
# unconfirmed email column, and copied to email column on successful confirmation.
|
120
|
+
config.reconfirmable = true
|
121
|
+
|
122
|
+
# Defines which key will be used when confirming an account
|
123
|
+
# config.confirmation_keys = [ :email ]
|
124
|
+
|
125
|
+
# ==> Configuration for :rememberable
|
126
|
+
# The time the user will be remembered without asking for credentials again.
|
127
|
+
# config.remember_for = 2.weeks
|
128
|
+
|
129
|
+
# If true, extends the user's remember period when remembered via cookie.
|
130
|
+
# config.extend_remember_period = false
|
131
|
+
|
132
|
+
# Options to be passed to the created cookie. For instance, you can set
|
133
|
+
# :secure => true in order to force SSL only cookies.
|
134
|
+
# config.rememberable_options = {}
|
135
|
+
|
136
|
+
# ==> Configuration for :validatable
|
137
|
+
# Range for password length. Default is 8..128.
|
138
|
+
config.password_length = 8..128
|
139
|
+
|
140
|
+
# Email regex used to validate email formats. It simply asserts that
|
141
|
+
# one (and only one) @ exists in the given string. This is mainly
|
142
|
+
# to give user feedback and not to assert the e-mail validity.
|
143
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
144
|
+
|
145
|
+
# ==> Configuration for :timeoutable
|
146
|
+
# The time you want to timeout the user session without activity. After this
|
147
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
148
|
+
# config.timeout_in = 30.minutes
|
149
|
+
|
150
|
+
# If true, expires auth token on session timeout.
|
151
|
+
# config.expire_auth_token_on_timeout = false
|
152
|
+
|
153
|
+
# ==> Configuration for :lockable
|
154
|
+
# Defines which strategy will be used to lock an account.
|
155
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
156
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
157
|
+
# config.lock_strategy = :failed_attempts
|
158
|
+
|
159
|
+
# Defines which key will be used when locking and unlocking an account
|
160
|
+
# config.unlock_keys = [ :email ]
|
161
|
+
|
162
|
+
# Defines which strategy will be used to unlock an account.
|
163
|
+
# :email = Sends an unlock link to the user email
|
164
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
165
|
+
# :both = Enables both strategies
|
166
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
167
|
+
# config.unlock_strategy = :both
|
168
|
+
|
169
|
+
# Number of authentication tries before locking an account if lock_strategy
|
170
|
+
# is failed attempts.
|
171
|
+
# config.maximum_attempts = 20
|
172
|
+
|
173
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
174
|
+
# config.unlock_in = 1.hour
|
175
|
+
|
176
|
+
# ==> Configuration for :recoverable
|
177
|
+
#
|
178
|
+
# Defines which key will be used when recovering the password for an account
|
179
|
+
# config.reset_password_keys = [ :email ]
|
180
|
+
|
181
|
+
# Time interval you can reset your password with a reset password key.
|
182
|
+
# Don't put a too small interval or your users won't have the time to
|
183
|
+
# change their passwords.
|
184
|
+
config.reset_password_within = 6.hours
|
185
|
+
|
186
|
+
# ==> Configuration for :encryptable
|
187
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
188
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
189
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
190
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
191
|
+
# REST_AUTH_SITE_KEY to pepper).
|
192
|
+
#
|
193
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
194
|
+
# config.encryptor = :sha512
|
195
|
+
|
196
|
+
# ==> Scopes configuration
|
197
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
198
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
199
|
+
# are using only default views.
|
200
|
+
# config.scoped_views = false
|
201
|
+
|
202
|
+
# Configure the default scope given to Warden. By default it's the first
|
203
|
+
# devise role declared in your routes (usually :user).
|
204
|
+
# config.default_scope = :user
|
205
|
+
|
206
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
207
|
+
# only the current scope. By default, Devise signs out all scopes.
|
208
|
+
# config.sign_out_all_scopes = true
|
209
|
+
|
210
|
+
# ==> Navigation configuration
|
211
|
+
# Lists the formats that should be treated as navigational. Formats like
|
212
|
+
# :html, should redirect to the sign in page when the user does not have
|
213
|
+
# access, but formats like :xml or :json, should return 401.
|
214
|
+
#
|
215
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
216
|
+
# should add them to the navigational formats lists.
|
217
|
+
#
|
218
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
219
|
+
# config.navigational_formats = ['*/*', :html]
|
220
|
+
|
221
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
222
|
+
config.sign_out_via = :delete
|
223
|
+
|
224
|
+
# ==> OmniAuth
|
225
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
226
|
+
# up on your models and hooks.
|
227
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
228
|
+
|
229
|
+
# ==> Warden configuration
|
230
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
231
|
+
# change the failure app, you can configure them inside the config.warden block.
|
232
|
+
#
|
233
|
+
# config.warden do |manager|
|
234
|
+
# manager.intercept_401 = false
|
235
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
236
|
+
# end
|
237
|
+
|
238
|
+
# ==> Mountable engine configurations
|
239
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
240
|
+
# is mountable, there are some extra configurations to be taken into account.
|
241
|
+
# The following options are available, assuming the engine is mounted as:
|
242
|
+
#
|
243
|
+
# mount MyEngine, at: '/my_engine'
|
244
|
+
#
|
245
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
246
|
+
# config.router_name = :my_engine
|
247
|
+
#
|
248
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
249
|
+
# so you need to do it manually. For the users scope, it would be:
|
250
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
251
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Faalis::Engine.setup do |config|
|
2
|
+
# Logger settings for Faalis.
|
3
|
+
# Default value is the rails logger
|
4
|
+
# config.logger = Logger.new(STDOUT)
|
5
|
+
|
6
|
+
config.orm = 'active_record'
|
7
|
+
|
8
|
+
# Add your models which want to manage their permissions
|
9
|
+
config.models_with_permission = ['Faalis::Permissions::Auth']
|
10
|
+
|
11
|
+
# Url prefix for dashboard section. default is '/dashboard'
|
12
|
+
# config.dashboard_namespace = :dashboard
|
13
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# Set the default text field size when input is a string. Default is nil.
|
4
|
+
# Formtastic::FormBuilder.default_text_field_size = 50
|
5
|
+
|
6
|
+
# Set the default text area height when input is a text. Default is 20.
|
7
|
+
# Formtastic::FormBuilder.default_text_area_height = 5
|
8
|
+
|
9
|
+
# Set the default text area width when input is a text. Default is nil.
|
10
|
+
# Formtastic::FormBuilder.default_text_area_width = 50
|
11
|
+
|
12
|
+
# Should all fields be considered "required" by default?
|
13
|
+
# Defaults to true.
|
14
|
+
# Formtastic::FormBuilder.all_fields_required_by_default = true
|
15
|
+
|
16
|
+
# Should select fields have a blank option/prompt by default?
|
17
|
+
# Defaults to true.
|
18
|
+
# Formtastic::FormBuilder.include_blank_for_select_by_default = true
|
19
|
+
|
20
|
+
# Set the string that will be appended to the labels/fieldsets which are required
|
21
|
+
# It accepts string or procs and the default is a localized version of
|
22
|
+
# '<abbr title="required">*</abbr>'. In other words, if you configure formtastic.required
|
23
|
+
# in your locale, it will replace the abbr title properly. But if you don't want to use
|
24
|
+
# abbr tag, you can simply give a string as below
|
25
|
+
# Formtastic::FormBuilder.required_string = "(required)"
|
26
|
+
|
27
|
+
# Set the string that will be appended to the labels/fieldsets which are optional
|
28
|
+
# Defaults to an empty string ("") and also accepts procs (see required_string above)
|
29
|
+
# Formtastic::FormBuilder.optional_string = "(optional)"
|
30
|
+
|
31
|
+
# Set the way inline errors will be displayed.
|
32
|
+
# Defaults to :sentence, valid options are :sentence, :list, :first and :none
|
33
|
+
# Formtastic::FormBuilder.inline_errors = :sentence
|
34
|
+
# Formtastic uses the following classes as default for hints, inline_errors and error list
|
35
|
+
|
36
|
+
# If you override the class here, please ensure to override it in your stylesheets as well
|
37
|
+
# Formtastic::FormBuilder.default_hint_class = "inline-hints"
|
38
|
+
# Formtastic::FormBuilder.default_inline_error_class = "inline-errors"
|
39
|
+
# Formtastic::FormBuilder.default_error_list_class = "errors"
|
40
|
+
|
41
|
+
# Set the method to call on label text to transform or format it for human-friendly
|
42
|
+
# reading when formtastic is used without object. Defaults to :humanize.
|
43
|
+
# Formtastic::FormBuilder.label_str_method = :humanize
|
44
|
+
|
45
|
+
# Set the array of methods to try calling on parent objects in :select and :radio inputs
|
46
|
+
# for the text inside each @<option>@ tag or alongside each radio @<input>@. The first method
|
47
|
+
# that is found on the object will be used.
|
48
|
+
# Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
|
49
|
+
# Formtastic::FormBuilder.collection_label_methods = [
|
50
|
+
# "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
|
51
|
+
|
52
|
+
# Specifies if labels/hints for input fields automatically be looked up using I18n.
|
53
|
+
# Default value: true. Overridden for specific fields by setting value to true,
|
54
|
+
# i.e. :label => true, or :hint => true (or opposite depending on initialized value)
|
55
|
+
# Formtastic::FormBuilder.i18n_lookups_by_default = false
|
56
|
+
|
57
|
+
# Specifies if I18n lookups of the default I18n Localizer should be cached to improve performance.
|
58
|
+
# Defaults to true.
|
59
|
+
# Formtastic::FormBuilder.i18n_cache_lookups = false
|
60
|
+
|
61
|
+
# Specifies the class to use for localization lookups. You can create your own
|
62
|
+
# class and use it instead by subclassing Formtastic::Localizer (which is the default).
|
63
|
+
# Formtastic::FormBuilder.i18n_localizer = MyOwnLocalizer
|
64
|
+
|
65
|
+
# You can add custom inputs or override parts of Formtastic by subclassing Formtastic::FormBuilder and
|
66
|
+
# specifying that class here. Defaults to Formtastic::FormBuilder.
|
67
|
+
# Formtastic::Helpers::FormHelper.builder = MyCustomBuilder
|
68
|
+
|
69
|
+
# You can opt-in to Formtastic's use of the HTML5 `required` attribute on `<input>`, `<select>`
|
70
|
+
# and `<textarea>` tags by setting this to false (defaults to true).
|
71
|
+
# Formtastic::FormBuilder.use_required_attribute = true
|
72
|
+
|
73
|
+
# You can opt-in to new HTML5 browser validations (for things like email and url inputs) by setting
|
74
|
+
# this to false. Doing so will add a `novalidate` attribute to the `<form>` tag.
|
75
|
+
# See http://diveintohtml5.org/forms.html#validation for more info.
|
76
|
+
# Formtastic::FormBuilder.perform_browser_validations = true
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Faalis::Engine.load_seed
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faalis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -588,6 +588,7 @@ files:
|
|
588
588
|
- app/assets/javascripts/faalis/dashboard/app.js
|
589
589
|
- app/assets/javascripts/faalis/dashboard/application.js.erb
|
590
590
|
- app/assets/javascripts/faalis/dashboard/controllers/group.js.coffee
|
591
|
+
- app/assets/javascripts/faalis/dashboard/controllers/user.js
|
591
592
|
- app/assets/javascripts/faalis/dashboard/functions.js.erb
|
592
593
|
- app/assets/javascripts/faalis/dashboard/init.js
|
593
594
|
- app/assets/javascripts/faalis/dashboard/lib/api_result.js.coffee
|
@@ -608,6 +609,7 @@ files:
|
|
608
609
|
- app/assets/javascripts/faalis/dashboard/modules/auth/user.js
|
609
610
|
- app/assets/javascripts/faalis/dashboard/modules/conversations.js
|
610
611
|
- app/assets/javascripts/faalis/dashboard/modules/errors.js
|
612
|
+
- app/assets/javascripts/faalis/dashboard/modules/fake.js
|
611
613
|
- app/assets/javascripts/faalis/dashboard/modules/fields/#image.js#
|
612
614
|
- app/assets/javascripts/faalis/dashboard/modules/fields/boolean.js
|
613
615
|
- app/assets/javascripts/faalis/dashboard/modules/fields/controlcombo-field.js
|
@@ -632,6 +634,7 @@ files:
|
|
632
634
|
- app/assets/javascripts/faalis/dashboard/objects.js
|
633
635
|
- app/assets/javascripts/faalis/dashboard/resources/group_resource.js.coffee
|
634
636
|
- app/assets/javascripts/faalis/dashboard/resources/permission_resource.js.coffee
|
637
|
+
- app/assets/javascripts/faalis/dashboard/resources/user_resource.js.coffee
|
635
638
|
- app/assets/javascripts/faalis/dashboard/services/api.js.coffee
|
636
639
|
- app/assets/javascripts/faalis/dashboard/services/resource_factory.js.coffee
|
637
640
|
- app/assets/javascripts/faalis/dashboard/services/user.js.coffee
|
@@ -655,6 +658,8 @@ files:
|
|
655
658
|
- app/controllers/faalis/api/v1/users_controller.rb
|
656
659
|
- app/controllers/faalis/api_controller.rb
|
657
660
|
- app/controllers/faalis/application_controller.rb
|
661
|
+
- app/controllers/faalis/dashboard/groups_controller.rb
|
662
|
+
- app/controllers/faalis/dashboard/users_controller.rb
|
658
663
|
- app/controllers/faalis/dashboard_controller.rb
|
659
664
|
- app/controllers/faalis/home_controller.rb
|
660
665
|
- app/controllers/faalis/omniauth/callbacks_controller.rb
|
@@ -749,8 +754,25 @@ files:
|
|
749
754
|
- app/views/faalis/api/v1/users/show.html.erb
|
750
755
|
- app/views/faalis/api/v1/users/show.json.jbuilder
|
751
756
|
- app/views/faalis/api/v1/users/update.json.jbuilder
|
757
|
+
- app/views/faalis/dashboard/groups/_form.html.slim
|
758
|
+
- app/views/faalis/dashboard/groups/create.js.erb
|
759
|
+
- app/views/faalis/dashboard/groups/edit.html.slim
|
760
|
+
- app/views/faalis/dashboard/groups/errors.js.erb
|
761
|
+
- app/views/faalis/dashboard/groups/new.html.slim
|
762
|
+
- app/views/faalis/dashboard/groups/update.js.erb
|
752
763
|
- app/views/faalis/dashboard/index.html.erb
|
753
764
|
- app/views/faalis/dashboard/login_required_page.html.erb
|
765
|
+
- app/views/faalis/dashboard/users/_form.html.slim
|
766
|
+
- app/views/faalis/dashboard/users/_password_form.html.slim
|
767
|
+
- app/views/faalis/dashboard/users/create.js.erb
|
768
|
+
- app/views/faalis/dashboard/users/edit.html.slim
|
769
|
+
- app/views/faalis/dashboard/users/edit_password.html.slim
|
770
|
+
- app/views/faalis/dashboard/users/errors.js.erb
|
771
|
+
- app/views/faalis/dashboard/users/index.html.slim
|
772
|
+
- app/views/faalis/dashboard/users/new.html.slim
|
773
|
+
- app/views/faalis/dashboard/users/show.html.slim
|
774
|
+
- app/views/faalis/dashboard/users/update.js.erb
|
775
|
+
- app/views/faalis/dashboard/users/update_password.js.erb
|
754
776
|
- app/views/faalis/home/index.html.erb
|
755
777
|
- app/views/faalis/relations/_belongs_to.json.jbuilder
|
756
778
|
- app/views/layouts/faalis/application.html.erb
|
@@ -776,6 +798,7 @@ files:
|
|
776
798
|
- db/migrate/20140613120923_add_users_groups_table.rb
|
777
799
|
- db/seeds.rb
|
778
800
|
- lib/faalis.rb
|
801
|
+
- lib/faalis/action_dispatch.rb
|
779
802
|
- lib/faalis/api.rb
|
780
803
|
- lib/faalis/api/groups_api.rb
|
781
804
|
- lib/faalis/api/permissions_api.rb
|
@@ -783,6 +806,7 @@ files:
|
|
783
806
|
- lib/faalis/api/users_api.rb
|
784
807
|
- lib/faalis/concerns.rb
|
785
808
|
- lib/faalis/concerns/authorizable.rb
|
809
|
+
- lib/faalis/configuration.rb
|
786
810
|
- lib/faalis/cucumber.rb
|
787
811
|
- lib/faalis/cucumber/auth.rb
|
788
812
|
- lib/faalis/cucumber/exceptions.rb
|
@@ -871,6 +895,8 @@ files:
|
|
871
895
|
- lib/generators/faalis/templates/js/list_view/partials/index_controller.js.erb
|
872
896
|
- lib/generators/faalis/templates/js/list_view/partials/menu.js.erb
|
873
897
|
- lib/generators/faalis/templates/js_scaffold.README
|
898
|
+
- lib/generators/faalis/templates/policy/application_policy.rb
|
899
|
+
- lib/generators/faalis/templates/policy/policy.rb.erb
|
874
900
|
- lib/generators/faalis/templates/seeds.rb
|
875
901
|
- lib/generators/faalis/templates/spec/factories/groups.rb
|
876
902
|
- lib/generators/faalis/templates/spec/factories/users.rb
|
@@ -920,8 +946,14 @@ files:
|
|
920
946
|
- spec/dummy/config/locales/en.yml
|
921
947
|
- spec/dummy/config/routes.rb
|
922
948
|
- spec/dummy/db/development.sqlite3
|
923
|
-
- spec/dummy/db/migrate/
|
949
|
+
- spec/dummy/db/migrate/20150723215115_create_application_models.model_discovery_engine.rb
|
950
|
+
- spec/dummy/db/migrate/20150725103007_devise_create_faalis_users.faalis.rb
|
951
|
+
- spec/dummy/db/migrate/20150725103008_create_faalis_groups.faalis.rb
|
952
|
+
- spec/dummy/db/migrate/20150725103009_create_faalis_permissions.faalis.rb
|
953
|
+
- spec/dummy/db/migrate/20150725103010_add_permissions_groups_table.faalis.rb
|
954
|
+
- spec/dummy/db/migrate/20150725103011_add_users_groups_table.faalis.rb
|
924
955
|
- spec/dummy/db/schema.rb
|
956
|
+
- spec/dummy/db/seeds.rb
|
925
957
|
- spec/dummy/db/test.sqlite3
|
926
958
|
- spec/dummy/log/development.log
|
927
959
|
- spec/dummy/log/test.log
|
@@ -929,6 +961,20 @@ files:
|
|
929
961
|
- spec/dummy/public/422.html
|
930
962
|
- spec/dummy/public/500.html
|
931
963
|
- spec/dummy/public/favicon.ico
|
964
|
+
- spec/dummy/tmp/app/assets/javascripts/controlpanel/application.js
|
965
|
+
- spec/dummy/tmp/app/assets/stylesheets/dashboard/ltr/application.css
|
966
|
+
- spec/dummy/tmp/app/assets/stylesheets/dashboard/rtl/application.css
|
967
|
+
- spec/dummy/tmp/app/assets/stylesheets/ltr/application.css
|
968
|
+
- spec/dummy/tmp/app/assets/stylesheets/rtl/application.css
|
969
|
+
- spec/dummy/tmp/app/controllers/api_controller.rb
|
970
|
+
- spec/dummy/tmp/app/controllers/application_controller.rb
|
971
|
+
- spec/dummy/tmp/app/policies/application_policy.rb
|
972
|
+
- spec/dummy/tmp/config/initializers/devise.rb
|
973
|
+
- spec/dummy/tmp/config/initializers/faalis.rb
|
974
|
+
- spec/dummy/tmp/config/initializers/fast_gettext.rb
|
975
|
+
- spec/dummy/tmp/config/initializers/formstatic.rb
|
976
|
+
- spec/dummy/tmp/config/routes.rb
|
977
|
+
- spec/dummy/tmp/db/seeds.rb
|
932
978
|
- spec/factories/faalis/groups.rb
|
933
979
|
- spec/factories/faalis/permissions.rb
|
934
980
|
- spec/factories/faalis/users.rb
|
@@ -954,12 +1000,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
954
1000
|
version: '2.0'
|
955
1001
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
956
1002
|
requirements:
|
957
|
-
- - "
|
1003
|
+
- - ">="
|
958
1004
|
- !ruby/object:Gem::Version
|
959
|
-
version:
|
1005
|
+
version: '0'
|
960
1006
|
requirements: []
|
961
1007
|
rubyforge_project:
|
962
|
-
rubygems_version: 2.
|
1008
|
+
rubygems_version: 2.4.5
|
963
1009
|
signing_key:
|
964
1010
|
specification_version: 4
|
965
1011
|
summary: Faalis is a ruby on rails engine which provides a platform to easily build
|
@@ -973,6 +1019,20 @@ test_files:
|
|
973
1019
|
- spec/factories/faalis/permissions.rb
|
974
1020
|
- spec/factories/faalis/users.rb
|
975
1021
|
- spec/factories/faalis/groups.rb
|
1022
|
+
- spec/dummy/tmp/db/seeds.rb
|
1023
|
+
- spec/dummy/tmp/app/assets/javascripts/controlpanel/application.js
|
1024
|
+
- spec/dummy/tmp/app/assets/stylesheets/ltr/application.css
|
1025
|
+
- spec/dummy/tmp/app/assets/stylesheets/dashboard/ltr/application.css
|
1026
|
+
- spec/dummy/tmp/app/assets/stylesheets/dashboard/rtl/application.css
|
1027
|
+
- spec/dummy/tmp/app/assets/stylesheets/rtl/application.css
|
1028
|
+
- spec/dummy/tmp/app/controllers/api_controller.rb
|
1029
|
+
- spec/dummy/tmp/app/controllers/application_controller.rb
|
1030
|
+
- spec/dummy/tmp/app/policies/application_policy.rb
|
1031
|
+
- spec/dummy/tmp/config/routes.rb
|
1032
|
+
- spec/dummy/tmp/config/initializers/formstatic.rb
|
1033
|
+
- spec/dummy/tmp/config/initializers/devise.rb
|
1034
|
+
- spec/dummy/tmp/config/initializers/fast_gettext.rb
|
1035
|
+
- spec/dummy/tmp/config/initializers/faalis.rb
|
976
1036
|
- spec/dummy/log/development.log
|
977
1037
|
- spec/dummy/log/test.log
|
978
1038
|
- spec/dummy/public/500.html
|
@@ -982,9 +1042,15 @@ test_files:
|
|
982
1042
|
- spec/dummy/config.ru
|
983
1043
|
- spec/dummy/README.rdoc
|
984
1044
|
- spec/dummy/db/schema.rb
|
985
|
-
- spec/dummy/db/migrate/
|
1045
|
+
- spec/dummy/db/migrate/20150725103009_create_faalis_permissions.faalis.rb
|
1046
|
+
- spec/dummy/db/migrate/20150725103008_create_faalis_groups.faalis.rb
|
1047
|
+
- spec/dummy/db/migrate/20150725103010_add_permissions_groups_table.faalis.rb
|
1048
|
+
- spec/dummy/db/migrate/20150725103011_add_users_groups_table.faalis.rb
|
1049
|
+
- spec/dummy/db/migrate/20150725103007_devise_create_faalis_users.faalis.rb
|
1050
|
+
- spec/dummy/db/migrate/20150723215115_create_application_models.model_discovery_engine.rb
|
986
1051
|
- spec/dummy/db/test.sqlite3
|
987
1052
|
- spec/dummy/db/development.sqlite3
|
1053
|
+
- spec/dummy/db/seeds.rb
|
988
1054
|
- spec/dummy/app/views/layouts/application.html.erb
|
989
1055
|
- spec/dummy/app/assets/javascripts/application.js
|
990
1056
|
- spec/dummy/app/assets/stylesheets/application.css
|