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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
e376f315
Commit
e376f315
authored
Dec 04, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Admin can move project to ANY namespace. Updated permissions page
parent
2a1c5cdf
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
57 deletions
+64
-57
app/contexts/project_update_context.rb
app/contexts/project_update_context.rb
+3
-1
app/models/ability.rb
app/models/ability.rb
+2
-1
app/views/admin/projects/_form.html.haml
app/views/admin/projects/_form.html.haml
+1
-1
app/views/help/permissions.html.haml
app/views/help/permissions.html.haml
+58
-54
No files found.
app/contexts/project_update_context.rb
View file @
e376f315
...
@@ -2,7 +2,9 @@ class ProjectUpdateContext < BaseContext
...
@@ -2,7 +2,9 @@ class ProjectUpdateContext < BaseContext
def
execute
(
role
=
:default
)
def
execute
(
role
=
:default
)
namespace_id
=
params
[
:project
].
delete
(
:namespace_id
)
namespace_id
=
params
[
:project
].
delete
(
:namespace_id
)
if
can?
(
current_user
,
:change_namespace
,
project
)
&&
namespace_id
.
present?
allowed_transfer
=
can?
(
current_user
,
:change_namespace
,
project
)
||
role
==
:admin
if
allowed_transfer
&&
namespace_id
.
present?
if
namespace_id
==
Namespace
.
global_id
if
namespace_id
==
Namespace
.
global_id
if
project
.
namespace
.
present?
if
project
.
namespace
.
present?
# Transfer to global namespace from anyone
# Transfer to global namespace from anyone
...
...
app/models/ability.rb
View file @
e376f315
...
@@ -99,7 +99,8 @@ class Ability
...
@@ -99,7 +99,8 @@ class Ability
def
project_admin_rules
def
project_admin_rules
project_master_rules
+
[
project_master_rules
+
[
:change_namespace
,
:change_namespace
,
:rename_project
:rename_project
,
:remove_project
]
]
end
end
...
...
app/views/admin/projects/_form.html.haml
View file @
e376f315
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
.clearfix
.clearfix
=
f
.
label
:namespace_id
=
f
.
label
:namespace_id
.input
.input
=
f
.
select
:namespace_id
,
namespaces_options
(
@project
.
namespace_id
),
{},
{
class:
'chosen'
}
=
f
.
select
:namespace_id
,
namespaces_options
(
@project
.
namespace_id
,
:all
),
{},
{
class:
'chosen'
}
%span
.cred
Be careful. Changing project namespace can have unintended side effects
%span
.cred
Be careful. Changing project namespace can have unintended side effects
...
...
app/views/help/permissions.html.haml
View file @
e376f315
...
@@ -4,17 +4,16 @@
...
@@ -4,17 +4,16 @@
←
to index
←
to index
%hr
%hr
.row
%fieldset
.ui-box.span2
%legend
Guest
%h5
Guest
%ul
%ul
.unstyled
%li
Create new issue
%li
Create new issue
%li
Leave comments
%li
Leave comments
%li
Write on project wall
%li
Write on project wall
.ui-box.span3
%fieldset
%h5
Reporter
%legend
Reporter
%ul
.unstyled
%ul
%li
Create new issue
%li
Create new issue
%li
Leave comments
%li
Leave comments
%li
Write on project wall
%li
Write on project wall
...
@@ -24,9 +23,9 @@
...
@@ -24,9 +23,9 @@
%li
Create a code snippets
%li
Create a code snippets
.ui-box.span3
%fieldset
%h5
Developer
%legend
Developer
%ul
.unstyled
%ul
%li
Create new issue
%li
Create new issue
%li
Leave comments
%li
Leave comments
%li
Write on project wall
%li
Write on project wall
...
@@ -40,9 +39,9 @@
...
@@ -40,9 +39,9 @@
%li
Add tags
%li
Add tags
%li
Write a wiki
%li
Write a wiki
.ui-box.span3
%fieldset
%h5
Master
%legend
Master
%ul
.unstyled
%ul
%li
Create new issue
%li
Create new issue
%li
Leave comments
%li
Leave comments
%li
Write on project wall
%li
Write on project wall
...
@@ -62,3 +61,8 @@
...
@@ -62,3 +61,8 @@
%li
Edit project
%li
Edit project
%li
Add Deploy Keys to project
%li
Add Deploy Keys to project
%li
Configure Project Hooks
%li
Configure Project Hooks
%fieldset
%legend
Owner
%ul
%li
Transfer project to another namespace
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