Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
3ad6f27b
Commit
3ad6f27b
authored
Jan 17, 2024
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move .status.json to .status.
Keep a redirect for backwards compatibility.
parent
b92cf048
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
README.PROTOCOL
README.PROTOCOL
+2
-2
static/galene.js
static/galene.js
+1
-1
webserver/webserver.go
webserver/webserver.go
+7
-3
No files found.
README.PROTOCOL
View file @
3ad6f27b
...
...
@@ -33,7 +33,7 @@ at which the group is found. This may be obtained either by explicit
configuration by the user, or by parsing the `/public-groups.json` file
which may contain an array of group statuses (see below).
A client then performs an HTTP GET request on the file `.status
.json
` at
A client then performs an HTTP GET request on the file `.status` at
the group's location. This yields a single JSON object, which contains
the following fields:
...
...
@@ -158,7 +158,7 @@ The `username` field is the username that the server assigned to this
user. The `permissions` field is an array of strings that may contain the
values `present`, `op` and `record`. The `status` field is a dictionary
that contains status information about the group, and updates the data
obtained from the `.status
.json
` URL described above.
obtained from the `.status` URL described above.
## Maintaining group membership
...
...
static/galene.js
View file @
3ad6f27b
...
...
@@ -3906,7 +3906,7 @@ async function serverConnect() {
async
function
start
()
{
try
{
let
r
=
await
fetch
(
"
.status
.json
"
)
let
r
=
await
fetch
(
"
.status
"
)
if
(
!
r
.
ok
)
throw
new
Error
(
`
${
r
.
status
}
${
r
.
statusText
}
`
);
groupStatus
=
await
r
.
json
()
...
...
webserver/webserver.go
View file @
3ad6f27b
...
...
@@ -318,10 +318,14 @@ func groupHandler(w http.ResponseWriter, r *http.Request) {
return
}
_
,
kind
,
rest
:=
splitPath
(
r
.
URL
.
Path
)
if
kind
==
".status
.json
"
&&
rest
==
""
{
dir
,
kind
,
rest
:=
splitPath
(
r
.
URL
.
Path
)
if
kind
==
".status"
&&
rest
==
""
{
groupStatusHandler
(
w
,
r
)
return
}
else
if
kind
==
".status.json"
&&
rest
==
""
{
http
.
Redirect
(
w
,
r
,
dir
+
"/"
+
".status"
,
http
.
StatusPermanentRedirect
)
return
}
else
if
kind
==
".whip"
{
if
rest
==
""
{
whipEndpointHandler
(
w
,
r
)
...
...
@@ -384,7 +388,7 @@ func groupBase(r *http.Request) (string, error) {
func
groupStatusHandler
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
pth
,
kind
,
rest
:=
splitPath
(
r
.
URL
.
Path
)
if
kind
!=
".status
.json
"
||
rest
!=
""
{
if
kind
!=
".status"
||
rest
!=
""
{
http
.
Error
(
w
,
"Internal server error"
,
http
.
StatusInternalServerError
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment