discourse_disable_user_activation 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Jakob Hilden
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,3 @@
1
+ # DiscourseDisableUserActivation
2
+
3
+ Disables Discourse's user activation by overriding the `active?` method of the `User` model and always returning true.
@@ -0,0 +1,27 @@
1
+ module DiscourseDisableUserActivation
2
+
3
+ class Engine < Rails::Engine
4
+ engine_name 'discourse_disable_user_activation'
5
+
6
+ initializer "discourse_disable_user_activation.rails_initialization" do |app|
7
+ app.config.after_initialize do
8
+
9
+ User.class_eval do
10
+ def active?
11
+ true
12
+ end
13
+
14
+ def create_email_token
15
+ true
16
+ end
17
+
18
+ def email_confirmed?
19
+ true
20
+ end
21
+ end
22
+
23
+ end
24
+ end
25
+ end
26
+
27
+ end
metadata ADDED
@@ -0,0 +1,50 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: discourse_disable_user_activation
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jakob Hilden
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-10-01 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Disables Discourse's user activation by overriding the `active?` method
15
+ of the `User` model and always returning true.
16
+ email:
17
+ - jakobhilden@gmail.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - README.md
23
+ - LICENSE.txt
24
+ - lib/discourse_disable_user_activation.rb
25
+ homepage: https://github.com/railslove/discourse_disable_user_activation
26
+ licenses:
27
+ - MIT
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubyforge_project:
46
+ rubygems_version: 1.8.25
47
+ signing_key:
48
+ specification_version: 3
49
+ summary: Disables user activation in Discourse
50
+ test_files: []