mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
WebClient: refactor preserving share password
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -89,6 +89,11 @@ func (s *Share) GetAllowedFromAsString() string {
|
||||
return strings.Join(s.AllowFrom, ",")
|
||||
}
|
||||
|
||||
// IsPasswordHashed returns true if the password is hashed
|
||||
func (s *Share) IsPasswordHashed() bool {
|
||||
return util.IsStringPrefixInSlice(s.Password, hashPwdPrefixes)
|
||||
}
|
||||
|
||||
func (s *Share) getACopy() Share {
|
||||
allowFrom := make([]string, len(s.AllowFrom))
|
||||
copy(allowFrom, s.AllowFrom)
|
||||
|
||||
Reference in New Issue
Block a user