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
031590b4
Commit
031590b4
authored
Apr 10, 2023
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename 'allow-tokens' to 'unrestricted-tokens'.
parent
37782711
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
README
README
+2
-2
group/group.go
group/group.go
+3
-3
No files found.
README
View file @
031590b4
...
...
@@ -130,8 +130,8 @@ following fields are allowed:
- `max-history-age`: the time, in seconds, during which chat history is
kept (default 14400, i.e. 4 hours);
- `allow-recording`: if true, then recording is allowed in this group;
- `
allow-tokens`: if true, then ordinary users (without the "op" privilege)
are allowed to create tokens;
- `
unrestricted-tokens`: if true, then ordinary users (without the "op"
privilege)
are allowed to create tokens;
- `allow-anonymous`: if true, then users may connect with an empty username;
- `allow-subgroups`: if true, then subgroups of the form `group/subgroup`
are automatically created when first accessed;
...
...
group/group.go
View file @
031590b4
...
...
@@ -954,7 +954,7 @@ type Description struct {
AllowRecording
bool
`json:"allow-recording,omitempty"`
// Whether creating tokens is allowed
AllowTokens
bool
`json:"allow
-tokens,omitempty"`
UnrestrictedTokens
bool
`json:"unrestricted
-tokens,omitempty"`
// Whether subgroups are created on the fly.
AllowSubgroups
bool
`json:"allow-subgroups,omitempty"`
...
...
@@ -1129,7 +1129,7 @@ func (g *Group) getPasswordPermission(creds ClientCredentials) ([]string, error)
if
found
,
good
:=
matchClient
(
creds
,
desc
.
Presenter
);
found
{
if
good
{
p
:=
[]
string
{
"present"
}
if
desc
.
Allow
Tokens
{
if
desc
.
Unrestricted
Tokens
{
p
=
append
(
p
,
"token"
)
}
return
p
,
nil
...
...
@@ -1139,7 +1139,7 @@ func (g *Group) getPasswordPermission(creds ClientCredentials) ([]string, error)
if
found
,
good
:=
matchClient
(
creds
,
desc
.
Other
);
found
{
if
good
{
p
:=
[]
string
{}
if
desc
.
Allow
Tokens
{
if
desc
.
Unrestricted
Tokens
{
p
=
append
(
p
,
"token"
)
}
return
p
,
nil
...
...
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