Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide ability to manage public stacks for codenvy admins #2254

Merged
merged 2 commits into from
Jun 20, 2017

Conversation

akorneta
Copy link
Contributor

@akorneta akorneta commented Jun 1, 2017

What does this PR do?

Rewrite public stacks and recipes loading in accordance with che.
Provides a mechanism for extending the default permission filter logic on the domain-level for permission service.
Moves stacks.json into resource instead of configuration folder.

What issues does this PR fix or reference?

#2208

Changelog

Updated default stack loading policy, provides ability to add/delete predefined stacks for admins using stack API.

Release Notes

Default stacks loading policy was changed, now stacks loaded once on database initialization.
Those who use previous(load per server start) strategy may continue using it by setting CODENVY_PREDEFINED_STACKS_RELOAD_ON_START property value to true.
Added ability to add/delete predefined stacks for admin user through stack API.

@@ -507,5 +505,7 @@ protected void configure() {
bind(org.eclipse.che.api.agent.server.filters.AddExecAgentInStackFilter.class);

bind(org.eclipse.che.api.workspace.server.event.WorkspaceJsonRpcMessenger.class).asEagerSingleton();

bind(DomainsPermissionsCheckers.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This binding is redundant.


/**
* @author Anton Korneta
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

* @author Anton Korneta
*/
@Singleton
public class StackDomainSetPermissionsChecker implements SetPermissionsChecker {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

</goals>
<configuration>
<target>
<unzip dest="${project.build.directory}/stacks/" src="${org.eclipse.che.core:che-core-ide-stacks:jar}" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@sleshchenko sleshchenko force-pushed the stacks_recipes_loading_policy branch from d637f2c to 8819c59 Compare June 2, 2017 12:50
@akorneta akorneta force-pushed the stacks_recipes_loading_policy branch 2 times, most recently from f5d8ae1 to 3571119 Compare June 7, 2017 15:21
}
permissionsDao.store(new RecipePermissionsImpl("*", recipe.getId(), singletonList("search")));
} catch (ServerException | ConflictException ex) {
LOG.error("Failed to store recipe {} ", recipe.getId(), ex.getMessage());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two extra arguments but one {} in the message

@akorneta akorneta force-pushed the stacks_recipes_loading_policy branch from 9d4e264 to 00085c8 Compare June 8, 2017 06:58
@akorneta akorneta force-pushed the stacks_recipes_loading_policy branch 2 times, most recently from ebee849 to ac87b84 Compare June 8, 2017 15:41
Copy link
Contributor

@voievodin voievodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code is ok

@slemeur
Copy link
Contributor

slemeur commented Jun 9, 2017

For the same reasons than on eclipse-che/che#5234 . I'm -1 with the update policy here as well.

@akorneta akorneta force-pushed the stacks_recipes_loading_policy branch 3 times, most recently from 307c31f to 3baddfd Compare June 19, 2017 13:32
@akorneta
Copy link
Contributor Author

Updated doc + added property CODENVY_PREDEFINED_STACKS_RELOAD_ON_START for backward compatibility
@slemeur please take a look

@akorneta akorneta force-pushed the stacks_recipes_loading_policy branch from 3baddfd to bc010bb Compare June 19, 2017 15:45
@akorneta akorneta merged commit d4cebf8 into master Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants