Artifactory - Cancel operation in plugin - How to inform the user about what was wrong? - plugins

I successfully implemented a plugin for Artifactory which prevent any user to delete/overwrite any artifact that he has not created. This was done thanks to the "storage" hook and by implementing the appropriate "beforeCreate"/"beforeDelete" closures mentioned here:
Artifactory - user plugins
My problem is that if you cancel an operation, the only thing that the user see in the popup displayed by Artifactory is that "Undeploy was cancelled by a user plugin". How have the screenshot below:
How Artifactory notifies users when an action is cancelled by a plugin
Is there anyway to have a more relevant status displayed by this popup?
Cheers
JM

To start with a small disclosure, I'm with JFrog (:
The CancelException is the right way to go but currently not all closures support this functionality.
For example in the following user plugin deploying and deleting of any file will be blocked.
import org.artifactory.exception.CancelException
storage {
beforeDelete { item ->
throw new CancelException("This cannot happen", 403)
}
beforeCreate { item ->
throw new CancelException("This cannot happen", 403)
}
}
However only the beforeDeploy closure will display the customer error message to the user when trying to deploy an artifact from the UI.
We have opened the following two improvements related to the issue you raised here. Feel free to watch the issues in order to get a notification once it will be resolved.
RTFACT-13829 |
RTFACT-13828

Related

Google Action Console blocking to starting new release on deploy > Release

I am trying to "starting new release" on Google Action Console > deploy > Release, but Google Action Console is blocking and showing an alert box saying "Please fill out required app information fields before submitting."
where to find the required app information fields?
Wow, that is pretty vague.
In this case, make sure that all the required fields for all the tabs on the left have been filled out. This includes the Directory Information, company Details, and Brand Verification if necessary.

Keycloak registration throws HTTP 500 for duplicate email

I know there's an earlier question with this subject here, but the OP never reported if the one answer resolved the issue. And since
Internal Server Error
is about as user-unfriendly as you can get, I would love to change this to something that feels more like "a message" than "an anvil dropped on your foot".
I have found one other SO post that tangentially relates to this issue (about that disappearing "duplicate emails" switch), but the problem is indeed not about whether or not to allow duplicate emails (or how to revive hidden admin controls) but how a very ordinary issue is communicated to the user - well, like how Keycloak notifies the user when they try and register with an existing username.
We're currently using the Docker version of Keycloak 12.0.4 with some customisations (a custom BCrypt module, some logging changes) running in IBM Cloud, using a Postgresql DB. We also added a custom theme & internationalisation. The same error occurs also when using the default Keycloak theme, though.
Here are our Login settings:
It turned out to be a configuration issue, but so deeply hidden that even the Keycloak developer who looked into the ticket I created had glossed over it.
The perpetrator was in menu Configure > Authentication > tab: Flows > choose dropdown: Registration > Profile validation radio button [o REQUIRED | o DISABLED]
This was set to disabled, which in effect prevents the duplicate email check in the registration form that the Realm settings > tab: Login form suggest are active. But then, of course, the database won't like that, with above-mentioned result.
This combination of settings should at least issue a warning, of course. I hope this will be corrected.

Magento Checkout is stuck on Billing information step

I am new to the magento, and right now, i was working one website.
I did my initial development on my local machine and everything was fine. few days ago I moved the website into test server from my localhost. after that the checkout function is not working properly.
the problem is that i have almost have nothing on that page.
if user is not logged in, then he(she) sees 2 steps as log in, and billing information, but without content. only the titles.
if user is logged in, then he(she) sees step 1 billing information title, and again no content
the website is http://guerrilla.webionaria.com/
user:teste#mail.ru
password:testtest
can anyone help me with this please
There is a 'Fatal error' on your page.
The rendering stops with
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id',
The error appears in app/design/frontend/{interface}/{theme}/template/checkout/onepage/billing.phtml or in app/design/frontend/{interface}/{theme}/template/persistent/checkout/onepage/billing.phtml (if you have cart persistence enabled).
In both of the cases, for some reason this code gives an error:
<?php echo $this->helper('directory')->getRegionJson() ?>
To find out what the error is you need to enable error reporting and display_errors.
You can do that from index.php.
error_reporting(E_ALL | E_STRICT);
...
ini_set('display_errors', 1);
You can also enable the developer mode by changing this:
if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
Mage::setIsDeveloperMode(true);
}
to this
//if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
Mage::setIsDeveloperMode(true);
//}
Then try again. If the error does not appear on your screen look at the source of the page.
If the error does not tell you anything update the question with its contents.
Just installed Magento for the first time on my Localhost. And found the same problem. I found the solution in following way:
-- Enabled the error logs in System > Configuration > Developer Tools
-- Then attempted a checkout.
Bam! found the error in var/logs/system.log
The error was due to SOAP. I needed to enable PHP's soap library. And it proceeded well.
Hope it helps someone :)

ITEM name must be unique

Using Intuit Anywhere QuickBooks Desktop, I am creating items that added without errors to the cloud. Using an ItemQuery, Looking up the item works fine. Here is my XML request and response:
http://pastebin.com/4YaJbgZg
When I run the Intuit Sync Manager, my newly added items enter error state. These items do not exist in QuickBooks, before I run the sync manager. After entering error state, this query will make them appear:
ItemQuery iq = new ItemQuery();
iq.ErroredObjectsOnly = true;
var bItems = iq.ExecuteQuery<Item>(dataServices.ServiceContext);
How can I find out why these items enter error state? I created a log file using the Intuit Sync Manager, however, I see no error messages about these items. Here is my log:
http://pastebin.com/QhpKHvWF
QBD Item Create is in beta and is not supported in v2.
QBD Supported Objects and Operations
Support for Item Create will not be added until V3 is released. For more information about V3, please see the V3 webinar recording.

zend_auth causing application to error

i have been following some online screencasts and tutorials about zend_auth.
i have a basic zend application created by the zf tool.
within the index controller index action i place a little code to test if a user is authenticated.
if(!Zend_Auth::getInstance()->hasIdentity())
{
$this->_redirect('login');
}
now as far as i'm aware this should check to see if the current session has been authorised with an identity if it hasnt (ie returns false)
it will redirect the screen to the login controller index action.
all i get is the default error action page stating
An error occurred
Application error
does anyone have an idea wtf is going on.
i have a suspicion it has something to do with needing to set up an autoloader but i have already set an include path to the library folder . (plus i have no issues with accessing controller actions and the likes.
i had another issue with a form stopping my application from rendering anything but i will create another question about that.
thanks keyne setting the error reporting on was a good idea
for some reason i thought i had my app sent to development but it was production.
after looking at the error report i found i had forgotten to create a data folder on my test server to hold the session information.
so zend_auth creating a session failed to location the directory.