Skip to content

Commit

Permalink
Merge pull request #369 from ita-social-projects/develop
Browse files Browse the repository at this point in the history
merge develop to release
  • Loading branch information
VitaliiKulinskyi authored Jun 30, 2021
2 parents d5f9c45 + 6763eba commit 6f2abaf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
email: ${{ secrets.HEROKU_EMAIL }}
api_key: ${{ secrets.HEROKU_API_KEY }}
docker_compose_file: '.docker/docker-compose.heroku.yml'
heroku_apps: '[{"imagename":"dokazovi","appname":"dokazovi-be","apptype":"web"}]'
heroku_apps: '[{"imagename":"dokazovi","appname":"dokazovi-backend","apptype":"web"}]'
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ public ResponseEntity<Page<PostDTO>> findImportant(
}

@GetMapping(POST_SET_IMPORTANT)
@PreAuthorize("hasAuthority('SET_IMPORTANCE')")
@ApiPageable
@ApiOperation(value = "Set posts as important with order and remove previous order")
@ApiOperation(value = "Set posts as important with order and remove previous order",
authorizations = {@Authorization(value = "Authorization")})
public ResponseEntity<ApiResponseMessage> setPostAsImportant(
@ApiParam(value = "Multiple comma-separated posts IDs (new order), e.g. ?origins=1,2,3,4...",
@ApiParam(value = "Multiple comma-separated posts IDs (new order), e.g. ?posts=1,2,3,4...",
type = "string")
@RequestParam(required = true) Set<Integer> posts) {
ApiResponseMessage apiResponseMessage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public enum RolePermission implements GrantedAuthority {
DELETE_OWN_POST,
UPDATE_POST,
UPDATE_OWN_POST,
SAVE_PUBLICATION;
SAVE_PUBLICATION,
SET_IMPORTANCE;

@Override
public String getAuthority() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INSERT INTO public.role_permission (role_id, permissions)
VALUES (1, 'SET_IMPORTANCE');

0 comments on commit 6f2abaf

Please sign in to comment.