Skip to content

Commit

Permalink
[OPENMEETINGS-2764] permissions being set as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
solomax committed Mar 29, 2023
1 parent bcdbb43 commit 4e89e0c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 25 deletions.
5 changes: 5 additions & 0 deletions openmeetings-server/src/site/xdoc/ReleaseGuide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@
SET https://github.com/apache/openmeetings/tree/5.0.1
]]></source>
</li>
<li>Add timestamp to parent pom (properties section)
<source>
<project.build.outputTimestamp>YEAR-MONTH-DAY_OF_MONTHT00:00:00Z</project.build.outputTimestamp>
</source>
</li>
<li>
Create a TAG and commit it to the Git<br/>
<source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public boolean signIn(String secureHash, boolean markUsed) {
private void setUser(User u, Set<Right> rights) {
changeSessionId(); // required to prevent session fixation
userId = u.getId();
if (rights == null || rights.isEmpty()) {
if (rights == null) {
Set<Right> r = new HashSet<>(u.getRights());
if (u.getGroupUsers() != null && !AuthLevelUtil.hasAdminLevel(r)) {
for (GroupUser gu : u.getGroupUsers()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ public class HashPage extends BaseInitedPage implements IUpdatable {
static final String HASH = "secure";
static final String LANG = "language";
private final WebMarkupContainer recContainer = new WebMarkupContainer(PANEL_RECORDING);
private final VideoInfo vi = new VideoInfo("info");
private final VideoPlayer vp = new VideoPlayer("player");
private final VideoInfo videoInfo = new VideoInfo("info");
private final VideoPlayer videoPlayer = new VideoPlayer("player");
private boolean error = true;
private MainPanel mp = null;
private RoomPanel rp = null;
private MainPanel mainPanel = null;
private RoomPanel roomPanel = null;
private final PageParameters p;

@SpringBean
Expand All @@ -91,9 +91,9 @@ private void createRoom(Long roomId) {
Room room = roomDao.get(roomId);
if (room != null && !room.isDeleted()) {
error = false;
rp = new RoomPanel(CHILD_ID, room);
mp = new MainPanel(PANEL_MAIN, rp);
replace(mp);
roomPanel = new RoomPanel(CHILD_ID, room);
mainPanel = new MainPanel(PANEL_MAIN, roomPanel);
replace(mainPanel);
}
}

Expand Down Expand Up @@ -128,21 +128,21 @@ protected void onInitialize() {
} else {
Recording rec = i.getRecording();
if (rec != null) {
vi.setVisible(!i.isPasswordProtected());
vp.setVisible(!i.isPasswordProtected());
videoInfo.setVisible(!i.isPasswordProtected());
videoPlayer.setVisible(!i.isPasswordProtected());
if (!i.isPasswordProtected()) {
vi.update(null, rec);
vp.update(null, rec);
videoInfo.update(null, rec);
videoPlayer.update(null, rec);
}
recContainer.setVisible(true);
error = false;
}
Room r = i.getRoom();
if (r != null && !r.isDeleted()) {
createRoom(r.getId());
if (i.isPasswordProtected() && rp != null) {
mp.getChat().setVisible(false);
rp.setOutputMarkupPlaceholderTag(true).setVisible(false);
if (i.isPasswordProtected() && roomPanel != null) {
mainPanel.getChat().setVisible(false);
roomPanel.setOutputMarkupPlaceholderTag(true).setVisible(false);
}
}
}
Expand All @@ -153,8 +153,8 @@ protected void onInitialize() {
} else if (recId != null) {
recContainer.setVisible(true);
Recording rec = recDao.get(recId);
vi.update(null, rec);
vp.update(null, rec);
videoInfo.update(null, rec);
videoPlayer.update(null, rec);
error = false;
} else {
createRoom(roomId);
Expand Down Expand Up @@ -197,8 +197,8 @@ protected IWsClient getWsClient() {
error = false;
}
}
add(recContainer.add(vi.setOutputMarkupPlaceholderTag(true),
vp.setOutputMarkupPlaceholderTag(true)), new InvitationPasswordDialog("i-pass", this));
add(recContainer.add(videoInfo.setOutputMarkupPlaceholderTag(true),
videoPlayer.setOutputMarkupPlaceholderTag(true)), new InvitationPasswordDialog("i-pass", this));
remove(urlParametersReceivingBehavior);
add(new IconTextModal("access-denied")
.withLabel(errorMsg)
Expand All @@ -217,11 +217,11 @@ protected void onParameterArrival(IRequestParameters requestParameters, AjaxRequ
@Override
public void update(AjaxRequestTarget target) {
Invitation i = WebSession.get().getInvitation();
if (i.getRoom() != null && rp != null) {
rp.show(target);
if (i.getRoom() != null && roomPanel != null) {
roomPanel.show(target);
} else if (i.getRecording() != null) {
target.add(vi.update(target, i.getRecording()).setVisible(true)
, vp.update(target, i.getRecording()).setVisible(true));
target.add(videoInfo.update(target, i.getRecording()).setVisible(true)
, videoPlayer.update(target, i.getRecording()).setVisible(true));
}
}
}
2 changes: 0 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,6 @@
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<optimize>true</optimize>
<debug>true</debug>
<encoding>UTF-8</encoding>
</configuration>
Expand Down Expand Up @@ -1247,7 +1246,6 @@
</module>
</checkstyleRules>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<excludes>**/module-info.java</excludes>
Expand Down

0 comments on commit 4e89e0c

Please sign in to comment.