commit 11821e7272db2b77dcb3c3cf46631eecdb2cd489
parent f36019793d89d7f7fb5d0caa2ae486f03c6ddd39
Author: Matsuda Kenji <info@mtkn.jp>
Date: Mon, 11 Sep 2023 08:34:16 +0900
add comment about group
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/uid.go b/uid.go
@@ -6,6 +6,7 @@ import (
)
// p is logical OR of AREAD, AWRITE, AEXEC.
+// TODO: user is assumed to be the leader of the group
func hasPerm(f File, uid string, p fs.FileMode) (bool, error) {
fi, err := f.Stat()
if err != nil {
diff --git a/uid_test.go b/uid_test.go
@@ -27,6 +27,7 @@ func TestHasPerm(t *testing.T) {
want bool
}{
{permFile{0777, "bocchi", "kessoku"}, "bocchi", 04, true},
+ // TODO: user is assumed to be the leader of the group...
{permFile{0770, "bocchi", "kessoku"}, "nijika", 04, false},
{permFile{0000, "bocchi", "kessoku"}, "bocchi", 04, false},
}