Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Preventing program deletion

Hola all,

My client just had an issue where a beginner programmer accidentally deleted a program from the main OI screen. The OI checkin/checkout is not used. I don't think the repository keeps a backup copy?

Two questions:
1. Is there a good system/repository setting to prevent deletion of programs (source and object)
2. Is there any other option to prevent deletion on SYSPROCS/SYSOBJ?

I'm about to write an MFS. Just checking before I take the plunge.

Gracias!

Michael

Comments

  • If this is a beginner programmer perhaps you can change their access level from System Administrator to just Administrator. I think that should disable the Entity menu and avoid accidental deletes.
  • Got it. But the authorities want to lock it down.

    Do I need to just write an MFS to block deletes?
  • That is a solution. Not sure if it is the best solution.
  • I'm definitely open to better!
  • I can't offer better because you are obviously under constraints from "powers that be", and I don't know enough to offer alternatives that would satisfy their expectations. Otherwise this would be playing 20 questions and nobody got time for that. ;)
  • Thanks anyway, sir
  • So I wrote the MFS and it works to prevent deletion in SYSPROCS. But if someone deletes from the OI main window, it leave the SYSPROCS record but deletes the rest and it's no longer considered a "stored procedure." To make it work again, one would need to edit the SYSPROCS record, copy and then paste into a new stored procedure and recompile.

    Is there a better way to handle? Ideally I'd like to completely block the all the deletes associated with the program in question. Do I need to put the MFS on SYSREPOS or SYSOBJ or ?

    Thanks again!
  • Putting an MFS on SYSREPOS is doable but I consider it to be too risky. I suggest creating a hook for the Repository function and adding logic that bypasses the DELETE request for certain conditions.
  • I agree about the risky part.

    So I put the MFS on the SYSPROCS table, and it mostly works. The delete is blocked, and the source and object code are still there. The program will still run. All good. If the user happens to delete the entity from the main OI screen, it all still works, but the program is no longer registered as a stored procedure. One has to edit the SYSPROCS record, copy and paste into a new SP and recompile. It's doable but complicated for a novice (like the one who facilitated this to begin with.)

    I've tried using the RECOMPILE_PROC routine, as well as calling Repository with the COMPILE method. No joy. If there a good way to re-register a Repository entity that's been deleted when everything else is there?

    Gratzi!
  • Most of what you wrote is a duplicate of your prior post. You didn't comment at all on my suggestion, so I'm curious as to why that route didn't work.
  • I would have thought that simple recompiling would have set up the SYREPOS pointers and such. Just trying it before I get further down the rabbit hole.
  • Do any of the comments (especially the end) of this thread help?
  • Not really but it's ok. Doing something else. Thanks for the help!
Sign In or Register to comment.