juicedata / juicefs

JuiceFS is a distributed POSIX file system built on top of Redis and S3.
https://juicefs.com
Apache License 2.0
10.58k stars 925 forks source link

generic file permission handle #4379

Open jiefenghuang opened 7 months ago

jiefenghuang commented 7 months ago

What would you like to be added: Generic file permission management module or handler

Since file permission checks require reading data from the meta engine's transactions, it may be necessary to encapsulate them into handlers.

Why is this needed:

now that all meta engine need to do the same permission logic

https://github.com/juicedata/juicefs/blob/7b85645cac16c8442b3b7d35365a99dc0e339cdd/pkg/meta/redis.go#L1682-L1684

jiefenghuang commented 7 months ago

Perhaps all the APIs of the meta interface could be implemented as a generic workflow process, with meta.Engine abstracted as the data handle and transaction interface.