giticious 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/giticious/cli/main.rb +4 -1
- data/lib/giticious/cli/pubkey.rb +1 -3
- data/lib/giticious/service/pubkey.rb +2 -2
- data/lib/giticious/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e017881d98f992cb3ad73f98197b59614360367a
|
4
|
+
data.tar.gz: c46909a25604d2caddc605b6294eadbc351fb65c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7896375266ad95c52fed2d2f729941c0fcb05414dc9ac9df1cc1a7a6a08f403048a24b672adbb7696d9b1fed5b9dfa07ff1138e6cbe24c9ea17ac58cb64dd6f4
|
7
|
+
data.tar.gz: 2b7c2a6876dec722ac99703b10a4cb3958d64c40e839d8675c04e81e201517521fda5ffb0be768de7965f95ba6078a50f4b876df560829f9d82284ab0bb5caf1
|
data/lib/giticious/cli/main.rb
CHANGED
@@ -46,7 +46,10 @@ module Giticious
|
|
46
46
|
command = "#{command_match[1]} 'repositories/#{command_match[2]}.git'"
|
47
47
|
|
48
48
|
abort "Read access denied" unless perms.perm_read
|
49
|
-
|
49
|
+
|
50
|
+
if action == "git-receive-pack"
|
51
|
+
abort "Write access denied" unless perms.perm_write
|
52
|
+
end
|
50
53
|
|
51
54
|
Kernel.exec "git", "shell", "-c", command
|
52
55
|
end
|
data/lib/giticious/cli/pubkey.rb
CHANGED
@@ -10,9 +10,7 @@ module Giticious
|
|
10
10
|
exit 1
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
if Giticious::Service::Pubkey.new.add(username, pubkey, giticious_path)
|
13
|
+
if Giticious::Service::Pubkey.new.add(username, pubkey)
|
16
14
|
puts "Public key \"#{pubkey.split(//).last(80).join}\" for user #{username} has been added!"
|
17
15
|
end
|
18
16
|
|
@@ -24,12 +24,12 @@ module Giticious
|
|
24
24
|
false
|
25
25
|
end
|
26
26
|
|
27
|
-
def add(user, pubkey
|
27
|
+
def add(user, pubkey)
|
28
28
|
if exists?(pubkey)
|
29
29
|
raise RuntimeError, "This public key does already exist"
|
30
30
|
end
|
31
31
|
|
32
|
-
append_line('command="
|
32
|
+
append_line('command="/usr/local/bin/giticious gitserve ' + user + '",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ' + pubkey)
|
33
33
|
end
|
34
34
|
|
35
35
|
def delete(pubkey)
|
data/lib/giticious/version.rb
CHANGED