@nauticana/sail 0.5.3 → 0.5.4
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": "@nauticana/sail",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Metadata-driven Angular component library for CRUD admin frontends backed by the keel Go backend. Tables, forms, navigation, OTP/2FA/social auth, billing.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -62,9 +62,16 @@ export abstract class BaseView extends BaseTable {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Open the row dialog. Renamed conceptually from "edit": when the user
|
|
67
|
+
* has only `canRead()` , we still want to show them the record + child rows.
|
|
68
|
+
* The dialog itself (TableEdit) handles read-only mode — its Edit/New/Delete
|
|
69
|
+
* buttons are gated by the same permissions.
|
|
70
|
+
* Block only when neither read nor update is granted.
|
|
71
|
+
*/
|
|
65
72
|
editRecord(record: {[key: string]: any}) {
|
|
66
|
-
if (!this.canUpdate()) {
|
|
67
|
-
alert('Missing authorization to
|
|
73
|
+
if (!this.canUpdate() && !this.canRead()) {
|
|
74
|
+
alert('Missing authorization to view records');
|
|
68
75
|
return;
|
|
69
76
|
}
|
|
70
77
|
const dialogData = this.getDialogData(record, false);
|