This file is indexed.

/usr/share/doc/cockpit/guide/cockpit-login.html is in cockpit-doc 164-1.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cockpit.js: User Session</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Cockpit Guide">
<link rel="up" href="api-base1.html" title="API: base1">
<link rel="prev" href="cockpit-error.html" title="cockpit.js: Errors">
<link rel="next" href="cockpit-util.html" title="cockpit.js: Utilities">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="cockpit-error.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="api-base1.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cockpit Guide</th>
<td><a accesskey="n" href="cockpit-util.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="cockpit-login"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>cockpit.js: User Session</h2>
<p>cockpit.js: User Session — User information and login session state</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsection">
<a name="cockpit-logout"></a><h2>cockpit.logout()</h2>
<pre class="programlisting">
cockpit.logout([reload])
</pre>
<p>Logout of Cockpit. Unless <code class="code">reload</code> is <code class="code">false</code> this will also
      cause the page to be reloaded, so that the user can see the logged out state.</p>
</div>
<div class="refsection">
<a name="cockpit-user"></a><h2>cockpit.user()</h2>
<pre class="programlisting">
var promise = cockpit.user();
promise.done(function (user) { ... });
</pre>
<p>This object contains information about the user that's currently logged into cockpit.
      The following fields are defined:</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="code">"id"</code></span></p></td>
<td><p>This is unix user id.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="code">"name"</code></span></p></td>
<td><p>This is the unix user name like <code class="code">"root"</code>.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="code">"full_name"</code></span></p></td>
<td><p>This is a readable name for the user.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="code">"groups"</code></span></p></td>
<td><p>This is an array of group names to which the user belongs.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="code">"home"</code></span></p></td>
<td><p>This is user's home directory.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="code">"shell"</code></span></p></td>
<td><p>This is unix user shell.</p></td>
</tr>
</tbody>
</table></div>
<p>Returns a promise that completes once the user information is available.</p>
</div>
<div class="refsection">
<a name="cockpit-info-changed"></a><h2>cockpit.user.onchanged</h2>
<pre class="programlisting">
cockpit.user.addEventListener("changed", function() { ... })
</pre>
<p>This event is fired when the user info changes or first becomes available.</p>
</div>
<div class="refsection">
<a name="cockpit-permission"></a><h2>Permission lookup</h2>
<p>Cockpit provides a mechanism for checking if the current user satisfies a
      given criteria. Currently capable of checking for root users, and group
      membership. This is meant for updating UI elements based on what actions the
      user can perform. It is <span class="emphasis"><em>not an access control mechanism</em></span>.</p>
<div class="refsection">
<a name="cockpit-permission-constructor"></a><h3>cockpit.permission()</h3>
<pre class="programlisting">
permission = cockpit.permission([options])
</pre>
<p>Create a new permission object to check if the current user has permission.
        The "root" user is always given permission. The <code class="code">options</code> argument
        can contain a <code class="code">"group"</code> field, and members of that group are also
        given permission.</p>
</div>
<div class="refsection">
<a name="cockpit-permission-allowed"></a><h3>permission.allowed</h3>
<p>A boolean value which indicates if the permission is allowed or not. This will
        be <code class="code">null</code> if the permission is unknown, or there was an error checking
        the permission or the permission data has not yet loaded. This property will update
        asynchronously and if you wish to be notified of changes connect to the
        <a class="link" href="cockpit-login.html#cockpit-permission-changed" title="permission.onchanged">permission.onchanged</a> event.</p>
</div>
<div class="refsection">
<a name="cockpit-permission-changed"></a><h3>permission.onchanged</h3>
<pre class="programlisting">
permission.addEventListener("changed", function() { ... })
</pre>
<p>This event is fired when the permission changes. In particular the
        <a class="link" href="cockpit-login.html#cockpit-permission-allowed" title="permission.allowed">permission.allowed</a> property.</p>
</div>
<div class="refsection">
<a name="cockpit-permission-close"></a><h3>permission.close()</h3>
<pre class="programlisting">
permission.close()
</pre>
<p>Closes the permission object and tears down any registered callbacks and dbus subscriptions.</p>
</div>
</div>
</div>
<div class="footer"><hr></div>
</body>
</html>