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
Show file tree
Hide file tree
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
fix: change err msg
  • Loading branch information
ybzky committed Jun 14, 2024
commit 6f766a12bc0e03a6b03de6b628da0169f3c8a4c1
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ export class SheetPermissionInterceptorBaseController extends Disposable {
worksheetTypes: [WorksheetCopyPermission],
});
errorMsg = this._localeService.t('permission.dialog.copyErr');
if (!this._permissionService.getPermissionPoint(new WorkbookCopyPermission(this._univerInstanceService.getCurrentUnitForType<Workbook>(UniverInstanceType.UNIVER_SHEET)!.getUnitId()).id)?.value) {
errorMsg = this._localeService.t('permission.dialog.workbookCopyErr');
}
break;
case DeltaColumnWidthCommand.id:
case SetColWidthCommand.id:
Expand Down
1 change: 1 addition & 0 deletions packages/sheets-ui/src/locale/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ const locale: typeof zhCN = {
pasteErr: 'The range is protected, and you do not have paste permission. To paste, please contact the creator.',
setStyleErr: 'The range is protected, and you do not have permission to set styles. To set styles, please contact the creator.',
copyErr: 'The range is protected, and you do not have copy permission. To copy, please contact the creator.',
workbookCopyErr: 'The workbook is protected, and you do not have permission to copy. To copy, please contact the creator.',
setRowColStyleErr: 'The range is protected, and you do not have permission to set row and column styles. To set row and column styles, please contact the creator.',
moveRowColErr: 'The range is protected, and you do not have permission to move rows and columns. To move rows and columns, please contact the creator.',
moveRangeErr: 'The range is protected, and you do not have permission to move the selection. To move the selection, please contact the creator.',
Expand Down
1 change: 1 addition & 0 deletions packages/sheets-ui/src/locale/ru-RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ const locale: typeof zhCN = {
pasteErr: 'Диапазон защищен, и у вас нет разрешения на вставку. Для вставки свяжитесь с создателем.',
setStyleErr: 'Диапазон защищен, и у вас нет разрешения на установку стилей. Для установки стилей свяжитесь с создателем.',
copyErr: 'Диапазон защищен, и у вас нет разрешения на копирование. Для копирования свяжитесь с создателем.',
workbookCopyErr: 'Лист защищен, и у вас нет разрешения на копирование. Для копирования свяжитесь с создателем.',
setRowColStyleErr: 'Диапазон защищен, и у вас нет разрешения на установку стилей строк и столбцов. Для установки стилей строк и столбцов свяжитесь с создателем.',
moveRowColErr: 'Диапазон защищен, и у вас нет разрешения на перемещение строк и столбцов. Для перемещения строк и столбцов свяжитесь с создателем.',
moveRangeErr: 'Диапазон защищен, и у вас нет разрешения на перемещение выделения. Для перемещения выделения свяжитесь с создателем.',
Expand Down
1 change: 1 addition & 0 deletions packages/sheets-ui/src/locale/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ const locale = {
pasteErr: '该范围已被保护,目前无粘贴权限。如需粘贴,请联系创建者。',
setStyleErr: '该范围已被保护,目前无设置样式权限。如需设置样式,请联系创建者。',
copyErr: '该范围已被保护,目前无复制权限。如需复制,请联系创建者。',
workbookCopyErr: '该工作表已被保护,目前无复制权限。如需复制,请联系创建者。',
setRowColStyleErr: '该范围已被保护,目前无设置行列样式权限。如需设置行列样式,请联系创建者。',
moveRowColErr: '该范围已被保护,目前无移动行列权限。如需移动行列,请联系创建者。',
moveRangeErr: '该范围已被保护,目前无移动选区权限。如需移动选区,请联系创建者。',
Expand Down
Loading