How can I create a non-admingroup User that can run Import and Export in HAC successfully? - sap-commerce-cloud

For: SAP Commerce 1905.29
How can I create a User that can run Import (Console > ImpEx Import) and Export (Console > ImpEx Export) in HAC successfully? However, I don't want to give them access to destructive functions like Platform Initialize, Platform Update, or suspending threads. So, I don't want to assign them to admingroup.
As an experiment, I created a custom usergroup that is a member of employeegroup. When I created a new Employee and assigned the custom usergroup to it, it can log-in to HAC. But when the user performs FlexSearch, an error is displayed:
could not translate value expression 'session.catalogversions'
In HAC, the Import and Export functions causes an error.
In Backoffice, the Import and Export functions (under System > Tools) work properly.
How can I fix this issue?

This error coming from search restriction. Search restrictions available by user/usergroup. So you need to add your user group to these restrictions. You can find it in type system with name SearchRestriction.
More details are here: https://help.sap.com/docs/SAP_COMMERCE/4c33bf189ab9409e84e589295c36d96e/d913a77e22e7442381a2bd57065f1eb6.html?locale=en-US&q=Search%20Restriction

Related

Unable to reference Logic App Action output in inline Javascript

I am trying to access an action output in Logic App inline Javascript action as follows:
However, this leads to an error while saving the workflow -
Failed to save logic app <>. The template validation failed: 'The action(s) '#outputs('Get_current_loop_object')' referenced by 'inputs' in action 'Wrap_Work_Relationship_data_to_array_if_needed' are not defined in the template.'.
Any ideas what I may be missing?
As per my repro It works for me by using following steps with inline java script :
Click on the Workflow settings menu bar.
After that select integration account which you created:-
Add files in get content:
Then Initialize the variable name with object type which is needed.(variable "json" should have to be initialized & declared before using it in the java script)
Coming to Action item part you need to mention the function or the operation as action item that you have mentioned in the below javascript connector in the logic app.
Saved it successfully:
NOTE:- It is not supported with loop as mentioned in this document
For further details refer this link .

JSON Web Service not appearing in /api/jsonws

I m new to liferay perform crud operation but my create method is not appering in api/jsonws . I also check my service is active by lb gogo shell command
For ServiceBuilder operations, please check if you have remote-service="true" on your entity (attributes) inside the service.xml file. If not, please add this attribute and rerun servicebuilder.
Open your {EntityName}ServiceImpl (inside of the .service.impl package) and add your operations here.
Finally, rerun servicebuilder and deploy your app. When using api/jsonws - make sure you select the right context name with the dropdown.

JHipster first application

I’m a complete JHipster beginner and I want to create my first own JHipster application, but I got a problem that I’m not able to solve.
Firstly, I generated my app with following settings:
-Monolithic application
then I chose a base name and a default Java package of my app and HTTP Session Authentication.
Later, I chose following:
-SQL, MYSQL, MYSQL, Yes, with ehcache, Gradle, CSS preprocessor : Yes, Internationalization: Yes, Testing framework: Gatling
And to that moment everything looked fine , then I wanted to create my entity as follows:
Yo jhipster:entity activitylist
and I added three fields:
-activityname (String), acitivitydate (LocalDate) and rating (Integer) and then I added relationship with entity user, type: many to one.
Afterwards
I used yo jhipster:entity user and I added following fields: login(String), name(String), surname(String) and added relationship one to many with field user.
However, everytime when I tried to run it with docker I got compile Java Failure and following warnings:
warning: Unmapped target property: "authorities".
UserDTO userToUserDTO(User user);
error: Unknown property "password" in return type.
User userDTOToUser(UserDTO userDTO);
I would appreciate any help.
The problem with your app is the name of your entity: user.
You need to change the name of this entity because when You name it as following You create a new Java class : User, however JHipster has its own built-in User Java class which is located in src/main/java/domain folder.
This class has its own getter, setter methods and mapper which operation is affected when your entity „user" is created.
You can notice this fact in Your warnings when compiler informs You that it encountered unknown properties in Your return type in User userDTOToUser. I would strongly recommend You changing name of the user entity and everything else should work fine.

Drupal8 module development: hook_node_access not called

for my current site I have a content type that stores a user in an entity reference field. I want to allow the user referenced in this field to edit the data of that node. In drupal7 I would do that with a node_access hook - which I am not getting to work in drupal8.
Here is a demo code of my hook - for testing purposes I want to forbid everything. However it is never called, and no - I am not logged in as user1. Also reseted cache, uninstalled and installed the module again and rebuilt the permissions - nothing seems to make this hook work.
function mymodule_node_access(\Drupal\node\NodeInterface $node, $op, \Drupal\Core\Session\AccountInterface $account) {
$access = new AccessResultForbidden();
return $access;
}
My question is why is this hook never called - and if there is now with drupal 8 a better way to do so?
Any help will be appreciated.
Best regards,
Rambazamba
This hook is never called for user 1, since he bypasses every access control.
Try testing anonymously or as another role.
Try the following command. The tool 'drupal console' is required.
drupal node:access:rebuild

Tagged Hooks not recognized in a particular package

I have created a gradle project which uses cucumber and geb. My programming language is groovy.
All my steps files are located at com.bada.bada.bada.cucumber.step
Feature:
User usecases
#Login
Scenario: Login User to website
Given I am on the mywebsite
And I log in with a valid username and a valid password
When I see profile
Then I can see my profile image
and my Hook code is
this.metaClass.mixin(cucumber.api.groovy.Hooks)
this.metaClass.mixin(cucumber.api.groovy.EN)
Before("#Login") {
// Go nuts
}
If the definition of hook is in com.bada.bada.bada.cucumber.step.SomefileSteps.groovy, then the hook is recognised but if it exists in com.bada.bada.bada.cucumber.hooks.SomeHooks.groovy then it is not.
Why is this an issue?
Glue directories were not updated. Updating those fixed the issue.

Resources