-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6535 from luiseufrasio/FISH-8215-java-security-ac…
…l-does-not-exist FISH-8215 : port solution from Glassfish
- payara-server-7.2024.1.Alpha3.RC1
- payara-server-7.2024.1.Alpha2.RC1
- payara-server-7.2024.1.Alpha1
- payara-server-7.2024.1.Alpha1.RC1
- payara-server-6.2024.12
- payara-server-6.2024.12.RC1
- payara-server-6.2024.11
- payara-server-6.2024.11.RC1
- payara-server-6.2024.10
- payara-server-6.2024.10.RC1
- payara-server-6.2024.9
- payara-server-6.2024.9.RC1
- payara-server-6.2024.8
- payara-server-6.2024.8.RC2
- payara-server-6.2024.8.RC1
- payara-server-6.2024.7
- payara-server-6.2024.7.RC1
- payara-server-6.2024.6
- payara-server-6.2024.6.RC1
- payara-server-6.2024.5
- payara-server-6.2024.5.RC1
- payara-server-6.2024.4
- payara-server-6.2024.4.RC1
- payara-server-6.2024.3
- payara-server-6.2024.3.RC1
- payara-server-6.2024.2
- payara-server-6.2024.2.RC1
- payara-core-7.0.0.Alpha3
- payara-core-7.0.0.Alpha2
- payara-core-7.0.0.Alpha1
- payara-core-6.22.0
- payara-core-6.21.0
- payara-core-6.20.0
- payara-core-6.19.0
- payara-core-6.18.1
- payara-core-6.18.0
- payara-core-6.17.0
- payara-core-6.16.0
- payara-core-6.15.0
- payara-core-6.14.0
- payara-core-6.13.0
- payara-core-6.12.0
Showing
2 changed files
with
60 additions
and
10 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
51 changes: 51 additions & 0 deletions
51
nucleus/security/core/src/main/java/com/sun/enterprise/security/GroupPrincipal.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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 2021 Contributors to Eclipse Foundation. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0, which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the | ||
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
* version 2 with the GNU Classpath Exception, which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
*/ | ||
package com.sun.enterprise.security; | ||
|
||
import java.security.Principal; | ||
import java.util.Enumeration; | ||
|
||
/** | ||
* A group of principals. | ||
* | ||
* @author Arjan Tijms | ||
* | ||
*/ | ||
public interface GroupPrincipal extends Principal { | ||
|
||
/** | ||
* Returns true when the given principal is in this group. | ||
* | ||
* <p> | ||
* A recursive search is done, meaning that if a principal is in a group which is itself in this group, the result is true. | ||
* | ||
* @param principal the principal for which we check to be in this group. | ||
* | ||
* @return true if the principal is in this group, false otherwise. | ||
*/ | ||
boolean isMember(Principal principal); | ||
|
||
/** | ||
* Returns an enumeration of all the principals in this group. | ||
* | ||
* <p> | ||
* The returned principals can include principals that are besides instanced of Principal also instances of GroupPrincipal. | ||
* | ||
* @return an enumeration of principals in this group, potentially including nested group principals. | ||
*/ | ||
Enumeration<? extends Principal> members(); | ||
|
||
} |