Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpcs
dfss
Commits
9b42fc4c
Commit
9b42fc4c
authored
Feb 19, 2016
by
Richer Maximilien
Browse files
Merge branch '295_fix_windows_passwd' into 'master'
[c] Fix password question on non-unix terminals See merge request
!30
parents
c17cfe72
864c2dac
Pipeline
#309
failed with stage
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
9b42fc4c
...
...
@@ -71,7 +71,7 @@ Code lint:
-
"
./build/deps.sh"
-
"
cd
$GOPATH/src/dfss
&&
go
install
./..."
-
"
gometalinter
--install"
-
"
gometalinter
-t
--deadline=600s
-j1
--skip=api
--skip=fixtures
./..."
-
"
gometalinter
-t
--deadline=600s
-j1
--skip=api
--skip=fixtures
--disable=aligncheck
./..."
Deploy
:
stage
:
deploy
...
...
dfssc/register.go
View file @
9b42fc4c
...
...
@@ -80,6 +80,15 @@ func readIntParam(message, def string, ptr *int) {
// Get the password from standard input
func
readPassword
(
ptr
*
string
,
needConfirm
bool
)
error
{
if
!
terminal
.
IsTerminal
(
0
)
{
fmt
.
Println
(
"+------------------------- WARNING --------------------------+"
)
fmt
.
Println
(
"| This is not a UNIX terminal, your password will be visible |"
)
fmt
.
Println
(
"+------------------------- WARNING --------------------------+"
)
readStringParam
(
"Enter your passphrase"
,
""
,
ptr
)
return
nil
}
oldState
,
err
:=
terminal
.
MakeRaw
(
0
)
if
err
!=
nil
{
return
err
...
...
dfssp/contract/file.go
View file @
9b42fc4c
...
...
@@ -29,7 +29,7 @@ type TTPJSON struct {
// JSON is the structure used to store contract information in JSON format
type
JSON
struct
{
UUID
string
Date
time
.
Time
Date
*
time
.
Time
Comment
string
File
*
FileJSON
Signers
[]
SignerJSON
...
...
@@ -42,7 +42,7 @@ func GetJSON(c *entities.Contract, ttp *TTPJSON) ([]byte, error) {
data
:=
JSON
{
UUID
:
c
.
ID
.
Hex
(),
Date
:
c
.
Date
,
Date
:
&
c
.
Date
,
Comment
:
c
.
Comment
,
File
:
&
FileJSON
{
Name
:
c
.
File
.
Name
,
...
...
dfssp/entities/contract.go
View file @
9b42fc4c
...
...
@@ -77,8 +77,8 @@ func (r *ContractRepository) GetWaitingForUser(email string) ([]Contract, error)
"ready"
:
false
,
"signers"
:
bson
.
M
{
"$elemMatch"
:
bson
.
M
{
"email"
:
email
,
"hash"
:
""
,
"email"
:
email
,
"hash"
:
""
,
}},
},
&
res
)
return
res
,
err
...
...
dfssp/user/create.go
View file @
9b42fc4c
...
...
@@ -244,7 +244,7 @@ func launchMissedContracts(manager *mgdb.MongoManager, user *entities.User) {
repository
:=
entities
.
NewContractRepository
(
manager
.
Get
(
"contracts"
))
contracts
,
err
:=
repository
.
GetWaitingForUser
(
user
.
Email
)
if
err
!=
nil
{
log
.
Println
(
"Cannot get missed contracts for user"
,
user
.
Email
+
":"
,
err
)
log
.
Println
(
"Cannot get missed contracts for user"
,
user
.
Email
+
":"
,
err
)
}
for
_
,
c
:=
range
contracts
{
...
...
@@ -263,7 +263,7 @@ func launchMissedContracts(manager *mgdb.MongoManager, user *entities.User) {
// Update contract in database
_
,
err
=
repository
.
Collection
.
UpdateByID
(
c
)
if
err
!=
nil
{
log
.
Println
(
"Cannot update missed contract"
,
c
.
ID
,
"for user"
,
user
.
Email
+
":"
,
err
)
log
.
Println
(
"Cannot update missed contract"
,
c
.
ID
,
"for user"
,
user
.
Email
+
":"
,
err
)
}
if
c
.
Ready
{
...
...
Write
Preview
Supports
Markdown
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