Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix some permission bugs #2522

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fix permission name
  • Loading branch information
ybzky committed Jun 14, 2024
commit ccb6a1c74fb322294f9a6e815d0649e00c1b2c67
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ export const SheetPermissionPanelList = () => {

const hasManagerPermission = manageCollaboratorAction || currentUser.userID === item.creator?.userID;

const worksheet = workbook.getActiveSheet();

let ruleName = '';

const targetSheet = workbook.getSheetBySheetId(rule.subUnitId);
const targetName = targetSheet?.getName();
if (rule.unitType === UnitObject.SelectRange) {
const ranges = (rule as IRangeProtectionRule).ranges;
const rangeStr = ranges?.length
Expand All @@ -237,9 +237,9 @@ export const SheetPermissionPanelList = () => {
return v === 'NaN' ? '' : v;
}).filter((r) => !!r).join(',')
: '';
ruleName = `${worksheet.getName()}(${rangeStr})`;
ruleName = `${targetName}(${rangeStr})`;
} else if (rule.unitType === UnitObject.Worksheet) {
ruleName = worksheet.getName();
ruleName = targetName || '';
}

return (
Expand Down
Loading