fixed bug in creating user and returning parents of installations/folders
This commit is contained in:
parent
4b8c4f1942
commit
1021bb852a
|
@ -156,8 +156,8 @@ public static class SessionMethods
|
|||
.WithParent(sessionUser)
|
||||
.Do(() => newUser.Password = newUser.SaltAndHashPassword(newUser.Password))
|
||||
.Do(() => newUser.MustResetPassword = true)
|
||||
.Apply(Db.Create)
|
||||
&& Mailer.Mailer.SendVerificationMessage(newUser);
|
||||
.Apply(Db.Create);
|
||||
// && Mailer.Mailer.SendVerificationMessage(newUser);
|
||||
|
||||
//Send Email to new user to verify email and set password
|
||||
|
||||
|
|
|
@ -182,9 +182,9 @@ public static class UserMethods
|
|||
{
|
||||
return other?.Type switch
|
||||
{
|
||||
"installation" => user.HasAccessTo(Db.GetInstallationById(other.ParentId)),
|
||||
"user" => user.HasAccessTo(Db.GetUserById(other.ParentId)),
|
||||
"folder" => user.HasAccessTo(Db.GetFolderById(other.ParentId)),
|
||||
"Installation" => user.HasAccessTo(Db.GetFolderById(other.ParentId)),
|
||||
"User" => user.HasAccessTo(Db.GetUserById(other.ParentId)),
|
||||
"Folder" => user.HasAccessTo(Db.GetFolderById(other.ParentId)),
|
||||
_ => false
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue