This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push: new 4e89e0ca0 [OPENMEETINGS-2764] permissions being set as expected 4e89e0ca0 is described below commit 4e89e0ca076c83f26562f1146cf3e81ba0b16a7f Author: Maxim Solodovnik <solomax...@gmail.com> AuthorDate: Wed Mar 29 22:01:02 2023 +0700 [OPENMEETINGS-2764] permissions being set as expected --- openmeetings-server/src/site/xdoc/ReleaseGuide.xml | 5 +++ .../apache/openmeetings/web/app/WebSession.java | 2 +- .../apache/openmeetings/web/pages/HashPage.java | 44 +++++++++++----------- pom.xml | 2 - 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/openmeetings-server/src/site/xdoc/ReleaseGuide.xml b/openmeetings-server/src/site/xdoc/ReleaseGuide.xml index d0711e12d..8e3e70950 100644 --- a/openmeetings-server/src/site/xdoc/ReleaseGuide.xml +++ b/openmeetings-server/src/site/xdoc/ReleaseGuide.xml @@ -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> diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java index ad7f43840..1102f774b 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java @@ -341,7 +341,7 @@ public class WebSession extends AbstractAuthenticatedWebSession implements IWebS 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()) { diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java index 07c9d7dd6..786d32cb9 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java @@ -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 @@ -91,9 +91,9 @@ public class HashPage extends BaseInitedPage implements IUpdatable { 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); } } @@ -128,11 +128,11 @@ public class HashPage extends BaseInitedPage implements IUpdatable { } 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; @@ -140,9 +140,9 @@ public class HashPage extends BaseInitedPage implements IUpdatable { 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); } } } @@ -153,8 +153,8 @@ public class HashPage extends BaseInitedPage implements IUpdatable { } 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); @@ -197,8 +197,8 @@ public class HashPage extends BaseInitedPage implements IUpdatable { 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) @@ -217,11 +217,11 @@ public class HashPage extends BaseInitedPage implements IUpdatable { @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)); } } } diff --git a/pom.xml b/pom.xml index de62af46f..574c6ac26 100644 --- a/pom.xml +++ b/pom.xml @@ -1190,7 +1190,6 @@ <configuration> <source>${jdk.version}</source> <target>${jdk.version}</target> - <optimize>true</optimize> <debug>true</debug> <encoding>UTF-8</encoding> </configuration> @@ -1247,7 +1246,6 @@ </module> </checkstyleRules> <includeTestSourceDirectory>true</includeTestSourceDirectory> - <encoding>UTF-8</encoding> <consoleOutput>true</consoleOutput> <failsOnError>true</failsOnError> <excludes>**/module-info.java</excludes>