Jump to content

How to prevent server adding/editing/deleting


Vasily

Recommended Posts

Hello, 
I would like to figure out how to validate the server credentials for my provisioning module during adding/editing a server and prevent the operation and show an error if something is wrong.

Please advise how to do it. 

Can I  use hooks ServerAdd, ServerEdit, ServerDelete for it? if yes, what should I return in the hook callback?

Link to comment
Share on other sites

Those would be the correct hooks, but they don't support any returns and thus wont help here.   What you could do is use those hooks and redirect back to the server page when your tests fail and set a session variable of "server_error".  Then use an AdminAreaHeaderOutput hook and check for that session variable and display error. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated