add protected room mount type.

This commit is contained in:
Miroslav Šedivý
2022-01-17 22:35:41 +01:00
parent 332261a889
commit f140f9bc89
6 changed files with 16 additions and 6 deletions
+4 -1
View File
@@ -336,7 +336,10 @@ func (manager *RoomManagerCtx) Create(settings types.RoomSettings) (string, erro
// prefix host path
hostPath = path.Join(manager.config.StorageExternal, templateStoragePath, hostPath)
} else if mount.Type == types.MountPublic {
} else if mount.Type == types.MountProtected || mount.Type == types.MountPublic {
// readonly if mount type is protected
readOnly = mount.Type == types.MountProtected
// public whitelisted mounts
var isAllowed = false
for _, path := range manager.config.MountsWhitelist {
+4 -3
View File
@@ -44,9 +44,10 @@ type RoomEntry struct {
type MountType string
const (
MountPrivate MountType = "private"
MountTemplate MountType = "template"
MountPublic MountType = "public"
MountPrivate MountType = "private"
MountTemplate MountType = "template"
MountProtected MountType = "protected"
MountPublic MountType = "public"
)
type RoomMount struct {