Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
ce12967c
Commit
ce12967c
authored
May 08, 2017
by
Guus der Kinderen
Committed by
akrherz
Jun 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-1327: A list of JIDs cannot contain a String.
parent
986f402c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
AuthorizationBasedAuthProviderMapper.java
...e/openfire/auth/AuthorizationBasedAuthProviderMapper.java
+4
-1
AuthorizationBasedUserProviderMapper.java
...e/openfire/user/AuthorizationBasedUserProviderMapper.java
+4
-1
No files found.
src/java/org/jivesoftware/openfire/auth/AuthorizationBasedAuthProviderMapper.java
View file @
ce12967c
...
@@ -16,9 +16,11 @@
...
@@ -16,9 +16,11 @@
package
org
.
jivesoftware
.
openfire
.
auth
;
package
org
.
jivesoftware
.
openfire
.
auth
;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.admin.AdminManager
;
import
org.jivesoftware.openfire.admin.AdminManager
;
import
org.jivesoftware.util.ClassUtils
;
import
org.jivesoftware.util.ClassUtils
;
import
org.jivesoftware.util.JiveGlobals
;
import
org.jivesoftware.util.JiveGlobals
;
import
org.xmpp.packet.JID
;
import
java.util.SortedSet
;
import
java.util.SortedSet
;
import
java.util.TreeSet
;
import
java.util.TreeSet
;
...
@@ -98,7 +100,8 @@ public class AuthorizationBasedAuthProviderMapper implements AuthProviderMapper
...
@@ -98,7 +100,8 @@ public class AuthorizationBasedAuthProviderMapper implements AuthProviderMapper
public
AuthProvider
getAuthProvider
(
String
username
)
public
AuthProvider
getAuthProvider
(
String
username
)
{
{
// TODO add optional caching, to prevent retrieving the administrative users upon every invocation.
// TODO add optional caching, to prevent retrieving the administrative users upon every invocation.
final
boolean
isAdmin
=
AdminManager
.
getAdminProvider
().
getAdmins
().
contains
(
username
);
final
JID
jid
=
XMPPServer
.
getInstance
().
createJID
(
username
,
null
);
final
boolean
isAdmin
=
AdminManager
.
getAdminProvider
().
getAdmins
().
contains
(
jid
);
if
(
isAdmin
)
if
(
isAdmin
)
{
{
...
...
src/java/org/jivesoftware/openfire/user/AuthorizationBasedUserProviderMapper.java
View file @
ce12967c
...
@@ -16,8 +16,10 @@
...
@@ -16,8 +16,10 @@
package
org
.
jivesoftware
.
openfire
.
user
;
package
org
.
jivesoftware
.
openfire
.
user
;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.admin.AdminManager
;
import
org.jivesoftware.openfire.admin.AdminManager
;
import
org.jivesoftware.util.JiveGlobals
;
import
org.jivesoftware.util.JiveGlobals
;
import
org.xmpp.packet.JID
;
import
java.util.SortedSet
;
import
java.util.SortedSet
;
import
java.util.TreeSet
;
import
java.util.TreeSet
;
...
@@ -86,7 +88,8 @@ public class AuthorizationBasedUserProviderMapper implements UserProviderMapper
...
@@ -86,7 +88,8 @@ public class AuthorizationBasedUserProviderMapper implements UserProviderMapper
public
UserProvider
getUserProvider
(
String
username
)
public
UserProvider
getUserProvider
(
String
username
)
{
{
// TODO add optional caching, to prevent retrieving the administrative users upon every invocation.
// TODO add optional caching, to prevent retrieving the administrative users upon every invocation.
final
boolean
isAdmin
=
AdminManager
.
getAdminProvider
().
getAdmins
().
contains
(
username
);
final
JID
jid
=
XMPPServer
.
getInstance
().
createJID
(
username
,
null
);
final
boolean
isAdmin
=
AdminManager
.
getAdminProvider
().
getAdmins
().
contains
(
jid
);
if
(
isAdmin
)
if
(
isAdmin
)
{
{
...
...
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