-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add permitted authorities for a user in the /api/v1/user endpoint && …
…removed /api/v1/users endpoint (to get all the authorities) (#99)
- Loading branch information
Showing
6 changed files
with
77 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 10 additions & 16 deletions
26
webapp/src/main/java/ar/edu/itba/paw/webapp/models/AuthorityDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
package ar.edu.itba.paw.webapp.models; | ||
|
||
import org.springframework.security.core.GrantedAuthority; | ||
|
||
public class AuthorityDTO { | ||
|
||
private String action; | ||
private String location; | ||
|
||
public AuthorityDTO() {} | ||
private String authority; | ||
|
||
public AuthorityDTO(String action, String location) { | ||
this.action = action; | ||
this.location = location; | ||
} | ||
public AuthorityDTO() { | ||
|
||
public String getAction() { | ||
return action; | ||
} | ||
|
||
public void setAction(String action) { | ||
this.action = action; | ||
public AuthorityDTO(final GrantedAuthority authority) { | ||
this.authority = authority.getAuthority(); | ||
} | ||
|
||
public String getLocation() { | ||
return location; | ||
public String getAuthority() { | ||
return authority; | ||
} | ||
|
||
public void setLocation(String location) { | ||
this.location = location; | ||
public void setAuthority(String authority) { | ||
this.authority = authority; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters