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
4c060074
Commit
4c060074
authored
Sep 14, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip auth for group page but return auth for other group pages
parent
b7431ec0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
app/assets/stylesheets/generic/sidebar.scss
app/assets/stylesheets/generic/sidebar.scss
+1
-1
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+1
-1
app/models/ability.rb
app/models/ability.rb
+1
-1
app/models/group.rb
app/models/group.rb
+4
-0
No files found.
app/assets/stylesheets/generic/sidebar.scss
View file @
4c060074
...
@@ -146,7 +146,6 @@
...
@@ -146,7 +146,6 @@
}
}
.collapse-nav
a
{
.collapse-nav
a
{
left
:
0px
;
width
:
$sidebar_collapsed_width
;
width
:
$sidebar_collapsed_width
;
}
}
...
@@ -165,6 +164,7 @@
...
@@ -165,6 +164,7 @@
width
:
$sidebar_width
;
width
:
$sidebar_width
;
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
left
:
0
;
font-size
:
13px
;
font-size
:
13px
;
background
:
transparent
;
background
:
transparent
;
height
:
40px
;
height
:
40px
;
...
...
app/controllers/groups_controller.rb
View file @
4c060074
...
@@ -4,7 +4,7 @@ class GroupsController < Groups::ApplicationController
...
@@ -4,7 +4,7 @@ class GroupsController < Groups::ApplicationController
before_action
:group
,
except:
[
:new
,
:create
]
before_action
:group
,
except:
[
:new
,
:create
]
# Authorize
# Authorize
before_action
:authorize_read_group!
,
except:
[
:new
,
:create
]
before_action
:authorize_read_group!
,
except:
[
:
show
,
:
new
,
:create
]
before_action
:authorize_admin_group!
,
only:
[
:edit
,
:update
,
:destroy
,
:projects
]
before_action
:authorize_admin_group!
,
only:
[
:edit
,
:update
,
:destroy
,
:projects
]
before_action
:authorize_create_group!
,
only:
[
:new
,
:create
]
before_action
:authorize_create_group!
,
only:
[
:new
,
:create
]
...
...
app/models/ability.rb
View file @
4c060074
...
@@ -54,7 +54,7 @@ class Ability
...
@@ -54,7 +54,7 @@ class Ability
nil
nil
end
end
if
group
if
group
&&
group
.
public_profile?
[
:read_group
]
[
:read_group
]
else
else
[]
[]
...
...
app/models/group.rb
View file @
4c060074
...
@@ -119,6 +119,10 @@ class Group < Namespace
...
@@ -119,6 +119,10 @@ class Group < Namespace
end
end
end
end
def
public_profile?
projects
.
public_only
.
any?
end
def
post_create_hook
def
post_create_hook
Gitlab
::
AppLogger
.
info
(
"Group
\"
#{
name
}
\"
was created"
)
Gitlab
::
AppLogger
.
info
(
"Group
\"
#{
name
}
\"
was created"
)
...
...
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