Restrict record deletion to user who raised it

  • ml44230
  • ml44230's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Karma: 1
  • Thank you received: 1

ml44230 created the topic: Restrict record deletion to user who raised it

Hi everybody,
I'm using ContentBuilder to view list of BreezingForms records . Great !
I would like to restrict the usage of the Delete Button in order that a user can ONLY delete the record he has created when filling a BreezingForm form, e.g. same mail address for the logged-in user trying to delete a record from the list view using the Delete Button and from the email address included in the record to be deleted.
Actually, if the Delete Button appears in the list view, any user from a group havind the Delete permission is able to delete any record in the list view.
Does somebody has an idea of how to do that ?
I've seen there is a contentbuilder_delete function in the code, but I have not the knowledge to modify the javascript code !
Any help would be greatly appreciated.
Many thanks in advance
Michel
#165754
  • Posts: 15274
  • Karma: 286
  • Thank you received: 1070

pedro81 replied the topic: Restrict record deletion to user who raised it

Hello Michel,

CB cen give access permissions for:
- a user group
- the owner of the record (Force permissions on owner)

but you can NOT use both options at the same time. So you can disable this Delete permission for a group in that view, and then create another view based on the same database (or sabe BFs form) but with "Force permissions on owner".

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#165771
  • ml44230
  • ml44230's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Karma: 1
  • Thank you received: 1

ml44230 replied the topic: Restrict record deletion to user who raised it

Hi Pedro81,
Thank you so much !
Once again, you solved my problem ad I'm very happy !
I missunderstood the permission on group and owner !
With Delete permission on owner and no permission for the group, all is running perfectly, no need to code anything !
Thank you again for your speed response and for these great components BreezingForms and Contentuilder
I have just to correct a little bug in the appearance of the Delete button shown in the list report : the button is preceeded by fancy characters " }?> " (see attached file CB_img.jpg (Delete is replaced by the french "Supprimer")
Best regards
Michel
#165822
Attachments:
  • ml44230
  • ml44230's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Karma: 1
  • Thank you received: 1

ml44230 replied the topic: Restrict record deletion to user who raised it

Hi again,
To suppress the fancy characterstring before the delete button, just suppress the lines 128 and 129 in the code
found under \components\com_contentbuilder\views\list\tmpl\default.php
Regards
Michel
#165826
  • ml44230
  • ml44230's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Karma: 1
  • Thank you received: 1

ml44230 replied the topic: Restrict record deletion to user who raised it

Oops !!!
Sorry for my last append :sick:
I introduced this little bug myself trying to hide a button.
The original code is OK.
Don't take care of this (false) problem.
Regards
Michel
#165971
  • Posts: 15274
  • Karma: 286
  • Thank you received: 1070

pedro81 replied the topic: Restrict record deletion to user who raised it

No problem Michel, i set this thread as solved ;)

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#165984
Moderators: ForumSupporttomeperica
Time to create page: 0.116 seconds

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

New extension AnalyticsAnywhere released!

Track website visitors no matter if ad blockers are enabled! Check it out!

Lifetime Subscription

Special Offer! Get lifetime access to all of our current and future products and 2 years of professional support -- 149 for only 90!

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, WordPress® plugins, Joomla!® templates   this means, by purchasing a Lifetime Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our 1-Year or Lifetime Subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Pro Support Renewal Plans

If you just need professional support and no further access to downloads or simply want or need to renew professional support, you may choose between various support plans from here.