Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Duplicate button in DetailView
#1
Hello,

How can I disable Duplicate button in DetailView for some users? In my understanding duplication consists in creating a new entity with copied values. So by this logic if a user(his profile privileges) does not have 'create' privileges but have 'edit' privileges should not see the DUPLICATE button... which actually creates a entity. Right now that button is presented when 'edit' is available. Maybe sometimes that is desirable but maybe sometimes you really want to hide it.

I played with Record Access Control maps but it does not take that button/function in it's parameters

Thanks
Reply
#2
I think you are right, the duplicate button should not be available if the profile does not permit creating

I had a look at the code and see that this comes all the way back from our origins in vtigerCRM, they showed the button or not depending on the edit permission, but they didn't have a separate create option in the profile then so there was nothing more they could do. When we added the create option we left the edit check, which I think is incorrect. I am more worried about the fact that you can actually save the record, I would have expected it to not permit you.

Give me some time to review this and I will fix it
Joe
TSolucio
Reply
#3
Hi

I reviewed this. From my test I see that coreBOS didn't permit you to create the new record, which is what I would have expected, but did permit you to land on the create page.

I made these two changes to base the duplication button and action on Create permissions instead of Edit permissions:

https://github.com/tsolucio/corebos/comm...febb79f793
https://github.com/tsolucio/corebos/comm...740375f9cd

Thanks!
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)