Java Code Examples for java.security.acl.AclEntry#permissions()
The following examples show how to use
java.security.acl.AclEntry#permissions() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AclImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 2
Source File: AclImpl.java From dragonwell8_jdk with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 3
Source File: AclImpl.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 4
Source File: AclImpl.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 5
Source File: AclImpl.java From JDKSourceCode1.8 with MIT License | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 6
Source File: AclImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 7
Source File: AclImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 8
Source File: AclImpl.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 9
Source File: AclImpl.java From hottub with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 10
Source File: AclImpl.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 11
Source File: AclImpl.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 12
Source File: AclImpl.java From jdk8u_jdk with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 13
Source File: AclImpl.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }
Example 14
Source File: AclImpl.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 3 votes |
/** * Returns an enumeration for the set of allowed permissions for * the specified principal * (representing an entity such as an individual or a group). * This set of allowed permissions is calculated as follows: * <UL> * <LI>If there is no entry in this Access Control List for the specified * principal, an empty permission set is returned.</LI> * <LI>Otherwise, the principal's group permission sets are determined. * (A principal can belong to one or more groups, where a group is a group * of principals, represented by the Group interface.)</LI> * </UL> * @param user the principal whose permission set is to be returned. * @return the permission set specifying the permissions the principal * is allowed. * @see java.security.Principal */ @Override public Enumeration<Permission> getPermissions(Principal user){ Vector<Permission> empty = new Vector<>(); for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){ AclEntry ent = e.nextElement(); if (ent.getPrincipal().equals(user)) return ent.permissions(); } return empty.elements(); }