This file is indexed.

/usr/share/doc/rt4-doc-html/RT/Principal.html is in rt4-doc-html 4.4.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<ul id="index">
  <li>
    <ul>
      <li><a href="#IsGroup">IsGroup</a></li>
      <li><a href="#IsRoleGroup">IsRoleGroup</a></li>
      <li><a href="#IsUser">IsUser</a></li>
      <li><a href="#Object">Object</a></li>
      <li><a href="#DisplayName">DisplayName</a></li>
      <li><a href="#GrantRight-Right-RIGHTNAME-Object-undef">GrantRight { Right =&gt; RIGHTNAME, Object =&gt; undef }</a></li>
      <li><a href="#RevokeRight-Right-RightName-Object-object">RevokeRight { Right =&gt; &quot;RightName&quot;, Object =&gt; &quot;object&quot; }</a></li>
      <li><a href="#HasRight-Right-right-Object-undef">HasRight (Right =&gt; &#39;right&#39; Object =&gt; undef)</a></li>
      <li><a href="#HasRights">HasRights</a></li>
      <li><a href="#HasRight">_HasRight</a></li>
      <li><a href="#RolesWithRight">RolesWithRight</a></li>
      <li><a href="#InvalidateACLCache">InvalidateACLCache</a></li>
      <li><a href="#GetPrincipalTypeForACL">_GetPrincipalTypeForACL</a></li>
      <li><a href="#ReferenceId">_ReferenceId</a></li>
      <li><a href="#id">id</a></li>
      <li><a href="#PrincipalType">PrincipalType</a></li>
      <li><a href="#SetPrincipalType-VALUE">SetPrincipalType VALUE</a></li>
      <li><a href="#Disabled">Disabled</a></li>
      <li><a href="#SetDisabled-VALUE">SetDisabled VALUE</a></li>
    </ul>
  </li>
</ul>

<h2 id="IsGroup"><a href="#___top">IsGroup</a></h2>

<p>Returns true if this principal is a group. Returns undef, otherwise</p>

<h2 id="IsRoleGroup"><a href="#___top">IsRoleGroup</a></h2>

<p>Returns true if this principal is a role group. Returns undef, otherwise.</p>

<h2 id="IsUser"><a href="#___top">IsUser</a></h2>

<p>Returns true if this principal is a User. Returns undef, otherwise</p>

<h2 id="Object"><a href="#___top">Object</a></h2>

<p>Returns the user or group associated with this principal</p>

<h2 id="DisplayName"><a href="#___top">DisplayName</a></h2>

<p>Returns the relevant display name for this principal</p>

<h2 id="GrantRight-Right-RIGHTNAME-Object-undef"><a href="#___top">GrantRight { Right =&gt; RIGHTNAME, Object =&gt; undef }</a></h2>

<p>A helper function which calls RT::ACE-&gt;Create</p>

<pre><code>   Returns a tuple of (STATUS, MESSAGE);  If the call succeeded, STATUS is true. Otherwise it&#39;s 
   false.</code></pre>

<h2 id="RevokeRight-Right-RightName-Object-object"><a href="#___top">RevokeRight { Right =&gt; &quot;RightName&quot;, Object =&gt; &quot;object&quot; }</a></h2>

<p>Delete a right that a user has</p>

<pre><code>   Returns a tuple of (STATUS, MESSAGE);  If the call succeeded, STATUS is true. Otherwise it&#39;s 
      false.</code></pre>

<h2 id="HasRight-Right-right-Object-undef"><a href="#___top">HasRight (Right =&gt; &#39;right&#39; Object =&gt; undef)</a></h2>

<p>Checks to see whether this principal has the right &quot;Right&quot; for the Object specified. This takes the params:</p>

<dl>

<dt id="Right">Right</dt>
<dd>

<p>name of a right</p>

</dd>
<dt id="Object1">Object</dt>
<dd>

<p>an RT style object (-&gt;id will get its id)</p>

</dd>
</dl>

<p>Returns 1 if a matching ACE was found. Returns undef if no ACE was found.</p>

<p>Use <a href="#HasRights">&quot;HasRights&quot;</a> to fill a fast cache, especially if you&#39;re going to check many different rights with the same principal and object.</p>

<h2 id="HasRights"><a href="#___top">HasRights</a></h2>

<p>Returns a hash reference with all rights this principal has on an object. Takes Object as a named argument.</p>

<p>Main use case of this method is the following:</p>

<pre><code>    $ticket-&gt;CurrentUser-&gt;PrincipalObj-&gt;HasRights( Object =&gt; $ticket );
    ...
    $ticket-&gt;CurrentUserHasRight(&#39;A&#39;);
    ...
    $ticket-&gt;CurrentUserHasRight(&#39;Z&#39;);</code></pre>

<p>Results are cached and the cache is used in this and, as well, in <a href="#HasRight">&quot;HasRight&quot;</a> method speeding it up. Don&#39;t use hash reference returned by this method directly for rights checks as it&#39;s more complicated then it seems, especially considering config options like &#39;DisallowExecuteCode&#39;.</p>

<h2 id="HasRight"><a href="#___top">_HasRight</a></h2>

<p>Low level HasRight implementation, use HasRight method instead.</p>

<h2 id="RolesWithRight"><a href="#___top">RolesWithRight</a></h2>

<p>Returns list with names of roles that have right on set of objects. Takes Right, EquiveObjects, IncludeSystemRights and IncludeSuperusers arguments.</p>

<p>IncludeSystemRights is true by default, rights granted systemwide are ignored when IncludeSystemRights is set to a false value.</p>

<p>IncludeSuperusers is true by default, SuperUser right is not checked if it&#39;s set to a false value.</p>

<h2 id="InvalidateACLCache"><a href="#___top">InvalidateACLCache</a></h2>

<p>Cleans out and reinitializes the user rights cache</p>

<h2 id="GetPrincipalTypeForACL"><a href="#___top">_GetPrincipalTypeForACL</a></h2>

<p>Gets the principal type. if it&#39;s a user, it&#39;s a user. if it&#39;s a role group and it has a Type, return that. if it has no type, return group.</p>

<h2 id="ReferenceId"><a href="#___top">_ReferenceId</a></h2>

<p>Returns a list uniquely representing an object or normal scalar.</p>

<p>For a scalar, its string value is returned. For an object that has an id() method which returns a value, its class name and id are returned as a string separated by a &quot;-&quot;. For an object that has an id() method which returns false, its class name is returned.</p>

<h2 id="id"><a href="#___top">id</a></h2>

<p>Returns the current value of id. (In the database, id is stored as int(11).)</p>

<h2 id="PrincipalType"><a href="#___top">PrincipalType</a></h2>

<p>Returns the current value of PrincipalType. (In the database, PrincipalType is stored as varchar(16).)</p>

<h2 id="SetPrincipalType-VALUE"><a href="#___top">SetPrincipalType VALUE</a></h2>

<p>Set PrincipalType to VALUE. Returns (1, &#39;Status message&#39;) on success and (0, &#39;Error Message&#39;) on failure. (In the database, PrincipalType will be stored as a varchar(16).)</p>

<h2 id="Disabled"><a href="#___top">Disabled</a></h2>

<p>Returns the current value of Disabled. (In the database, Disabled is stored as smallint(6).)</p>

<h2 id="SetDisabled-VALUE"><a href="#___top">SetDisabled VALUE</a></h2>

<p>Set Disabled to VALUE. Returns (1, &#39;Status message&#39;) on success and (0, &#39;Error Message&#39;) on failure. (In the database, Disabled will be stored as a smallint(6).)</p>

<a href="./../">&larr; Back to index</a>