Changeset 3b38c41


Ignore:
Timestamp:
Mar 27, 2011 4:43:03 PM (8 years ago)
Author:
Ted Faber <faber@…>
Branches:
abac0-leak, abac0-mei, compt_changes, gec13, master, mei-id, mei-rt0-n, mei_rt0, mei_rt2, mei_rt2_fix_1, meiyap-rt1, meiyap1, rt2, tvf-new-xml
Children:
4ab0561
Parents:
216c1d8
Message:

Make prereqs visible and role_name work as specced.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/net/deterlab/abac/Role.java

    ra5cfe93 r3b38c41  
    178178    public String principal() { return m_parts.length > 0 ? m_parts[0] : null; }
    179179    /**
    180      * Return the role name (part after the first dot and before any second)
     180     * Return the role name after the last dot
    181181     * @return the role name
    182182     */
    183     public String role_name() { return m_parts.length > 1 ? m_parts[1] : null; }
     183    public String role_name() { return m_parts[m_parts.length-1]; }
    184184    /**
    185185     * Return the linked role (first two parts of a linking role)
     
    194194     * @throws RuntimeException if this is not an intersection role
    195195     */
    196     Role[] prereqs() throws RuntimeException {
     196    public Role[] prereqs() throws RuntimeException {
    197197        if (!is_intersection())
    198198            throw new RuntimeException("Not an intersection role.");
Note: See TracChangeset for help on using the changeset viewer.