mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) give more detailed reasons for access denied when memos are present
Summary: With this change, if a comment is added to an ACL formula, then that comment will be offered to the user if access is denied and that rule could potentially have granted access. The code is factored so that when access is permitted, or when partially visible tables are being filtered, there is little overhead. Comments are gathered only when an explicit denial of access. Test Plan: added tests, updated tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2730
This commit is contained in:
@@ -57,6 +57,9 @@ function buildNotificationDom(item: Notification, options: IBeaconOpenOptions) {
|
||||
item.options.actions.length ? cssToastActions(
|
||||
item.options.actions.map((action) => buildAction(action, item, options))
|
||||
) : null,
|
||||
item.options.memos.length ? cssToastMemos(
|
||||
item.options.memos.map(memo => cssToastMemo(memo))
|
||||
) : null,
|
||||
),
|
||||
dom.maybe(item.options.canUserClose, () =>
|
||||
cssToastClose(testId('toast-close'),
|
||||
@@ -300,6 +303,19 @@ const cssToastAction = styled('div', `
|
||||
}
|
||||
`);
|
||||
|
||||
const cssToastMemos = styled('div', `
|
||||
margin-top: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
`);
|
||||
|
||||
const cssToastMemo = styled('div', `
|
||||
margin: 3px;
|
||||
color: ${colors.dark};
|
||||
background: ${colors.light};
|
||||
padding: 3px;
|
||||
`);
|
||||
|
||||
const cssProgressBarWrapper = styled('div', `
|
||||
margin-top: 18px;
|
||||
margin-bottom: 11px;
|
||||
|
||||
Reference in New Issue
Block a user