UniverPermissionService inject in angular #2118
Unanswered
dvivarelli
asked this question in
Q&A | 常见问题
Replies: 1 comment
-
In the current version of Univer, the UniverPermissionService is still under development. If you want to disable editing in the sheet, you can try some workarounds as mentioned in the documentation. Here's an online demo that demonstrates how to prevent the user from editing by blocking the execution of commands: https://stackblitz.com/edit/github-aayzou-crrzre?file=src%2Fmain.ts In summary, you can use the onBeforeCommandExecute listener to throw an error and block command execution, effectively disabling editing in the sheet. This approach can serve as a temporary solution until the UniverPermissionService is fully implemented. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an angular project and i have intalled univer.
It seems ok, but i need to inject UniverPermissionService in order to disable editor.
when i try to inject the service
@Inject(UniverPermissionService) permissionService!: UniverPermissionService
i got a null.
How can i get a valid instance of UniverPermissionService?
Beta Was this translation helpful? Give feedback.
All reactions