Skip to content

Commit

Permalink
Adapt acl signature to uyuni
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Sama <miguel.sama@suse.com>
  • Loading branch information
mikeletux committed Oct 17, 2023
1 parent b4ad4f3 commit fea34a4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions java/code/src/com/redhat/rhn/common/security/acl/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,9 @@ public boolean aclSystemSupportsPtfRemoval(Map<String, Object> ctx, String[] par
* @param params parameters for acl
* @return true if the system is Pay-as-you-go
*/
public boolean aclSystemIsPayg(Object ctx, String[] params) {
Map map = (Map) ctx;
Long sid = getAsLong(map.get("sid"));
User user = (User) map.get("user");
public boolean aclSystemIsPayg(Map<String, Object> ctx, String[] params) {
Long sid = getAsLong(ctx.get("sid"));
User user = (User) ctx.get("user");

Server server = SystemManager.lookupByIdAndUser(sid, user);
if (server == null) {
Expand All @@ -625,5 +624,4 @@ public boolean aclSystemIsPayg(Object ctx, String[] params) {

return server.isPayg();
}

}

0 comments on commit fea34a4

Please sign in to comment.