WebVella/WebVella-ERP

How to add permissions to buttons?按钮怎么添加权限?

Opened this issue · 7 comments

I have a requirement to add role permission control to buttons. How can I achieve this?
我有这样一个需求,我想给按钮也添加角色的权限控制,该怎么实现?

Hey, this is something that we often do. My practice is to use the Render property and write small code snippet and use it for the logic when the button to be rendered or not. It is often used on the whole form too if there is any

Hi @bzashev ,Thank you for your answer,I just started learning this framework,Can you provide a demo?
Thanks very much

No demos regrettably. In the solution itself there is kind of a demo, a very outdated Project app, that has some base concepts in it. More info you can find in webvella.com

hi @bzashev
Can we provide an online demonstration address in the future for beginners to learn? Alternatively, add a more comprehensive example in the source code that includes as many aspects as possible. For example, as a framework developer, the button permissions I asked can be solved in just a few lines of code, but for beginners, this is too difficult

It is a good idea but it is a matter of free time to do it. I will discuss this with the team and let you know.

Okay, thank you very much. I'm going to use webvella for the project now, and I hope everything goes smoothly!

We created it before about 10 - 15 years and are continuously using it and updating it. If that helps. It is very handy as a platform to quickly start and build an app.