Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9f643ea2
Commit
9f643ea2
authored
Jan 27, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow licenses to meet the user limit exactly
Closes
https://gitlab.com/gitlab-org/gitlab-ee/issues/232
parent
707f6abd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/models/license.rb
app/models/license.rb
+1
-1
spec/models/license_spec.rb
spec/models/license_spec.rb
+9
-0
No files found.
app/models/license.rb
View file @
9f643ea2
...
...
@@ -102,7 +102,7 @@ class License < ActiveRecord::Base
return
unless
active_user_count
return
if
active_user_count
<
restricted_user_count
return
if
active_user_count
<
=
restricted_user_count
overage
=
active_user_count
-
restricted_user_count
...
...
spec/models/license_spec.rb
View file @
9f643ea2
...
...
@@ -79,6 +79,15 @@ describe License do
expect
(
license
).
to
be_valid
end
end
context
"when the active user count is met exactly"
do
it
"is valid"
do
active_user_count
=
100
gl_license
.
restrictions
=
{
active_user_count:
active_user_count
}
expect
(
license
).
to
be_valid
end
end
end
describe
"Not expired"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment