@synopackageland/templates 0.17.9 → 0.17.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/templates",
3
- "version": "0.17.9",
3
+ "version": "0.17.10",
4
4
  "description": "Project templates for synopkgland init: native-go, native-python, native-node and native-rust (plain or Vue, with jobs, delegate and root-ops overlays), binary and compose.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,9 +22,9 @@ func (cfg Config) sharedFolders() sharedfolder.Config {
22
22
 
23
23
  // sharedFolderStatus answers the settings page: each folder, what the package
24
24
  // account has and what the App declared it needs, and whether an
25
- // administrator still has to grant. Administrators only, as the default
26
- // permissions say; list the method in internal/api/permissions.json to let
27
- // every DSM user read it.
25
+ // administrator still has to grant. The SDK's authenticated policy lets any
26
+ // signed-in DSM user read this status; granting package access stays an
27
+ // administrator operation.
28
28
  func (cfg Config) sharedFolderStatus(ctx context.Context, _ api.Caller, _ json.RawMessage) (any, error) {
29
29
  status, err := cfg.sharedFolders().Status()
30
30
  if err != nil {
@@ -67,10 +67,14 @@ func TestSharedFolderStatusReportsGrantedAndPending(t *testing.T) {
67
67
  }
68
68
  }
69
69
 
70
- func TestSharedFolderStatusIsAdministratorOnlyByDefault(t *testing.T) {
70
+ func TestSharedFolderStatusUsesSDKAuthenticatedPolicy(t *testing.T) {
71
71
  cfg := sharedFixture(t, 0o755)
72
- if code, _ := call(t, cfg, bob, "sharedfolder.status", `{}`); code == "" {
73
- t.Fatal("a non-administrator read the status")
72
+ // The SDK owns this read-only method's policy, including in jobs overlays.
73
+ if code, _ := call(t, cfg, bob, "sharedfolder.status", `{}`); code != "" {
74
+ t.Fatalf("a signed-in user could not read the status: %q", code)
75
+ }
76
+ if code, _ := call(t, cfg, nobody, "sharedfolder.status", `{}`); code != "session_required" {
77
+ t.Fatalf("a signed-out caller got %q, want session_required", code)
74
78
  }
75
79
  }
76
80