Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-shell
Commits
849d8fdc
Commit
849d8fdc
authored
Feb 12, 2015
by
GitLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable git-annex validate access
parent
60ea5770
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
lib/gitlab_projects.rb
lib/gitlab_projects.rb
+5
-0
lib/gitlab_shell.rb
lib/gitlab_shell.rb
+5
-6
No files found.
lib/gitlab_projects.rb
View file @
849d8fdc
...
@@ -238,4 +238,9 @@ class GitlabProjects
...
@@ -238,4 +238,9 @@ class GitlabProjects
$logger
.
info
"Update head in project
#{
project_name
}
to <
#{
new_head
}
>."
$logger
.
info
"Update head in project
#{
project_name
}
to <
#{
new_head
}
>."
true
true
end
end
def
git_init_annex
cmd
=
%W(git --git-dir=
#{
full_path
}
annex init "GitLab")
system
(
*
cmd
)
end
end
end
lib/gitlab_shell.rb
View file @
849d8fdc
...
@@ -20,12 +20,11 @@ class GitlabShell
...
@@ -20,12 +20,11 @@ class GitlabShell
if
git_cmds
.
include?
(
@git_cmd
)
if
git_cmds
.
include?
(
@git_cmd
)
ENV
[
'GL_ID'
]
=
@key_id
ENV
[
'GL_ID'
]
=
@key_id
ENV
[
'HOME'
]
=
'/var/opt/gitlab'
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# TODO: Fix validation for git-annex-shell !!!!
# TODO: Fix validation for git-annex-shell !!!!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if
true
#
validate_access
if
validate_access
process_cmd
process_cmd
else
else
message
=
"gitlab-shell: Access denied for git command <
#{
@origin_cmd
}
> by
#{
log_username
}
."
message
=
"gitlab-shell: Access denied for git command <
#{
@origin_cmd
}
> by
#{
log_username
}
."
...
...
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