Skip to content

Commit

Permalink
fixed method isUserContained (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Dec 12, 2024
1 parent 8f7a9d7 commit d7511dd
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,17 @@ public List<String> getUserNameList() {
* @param nameList
* @return
*/
public boolean isUserContained(List<String> nameList) {
public boolean isUserContained(List<?> nameList) {
if (nameList == null) {
return false;
}
List<String> userNameList = getUserNameList();
// check each element of the given nameList
for (String aName : nameList) {
if (aName != null && !aName.isEmpty()) {
if (userNameList.stream().anyMatch(aName::equals)) {
for (Object item : nameList) {
if (item != null) {
String aName = item.toString();
if (!aName.isEmpty() &&
userNameList.stream().anyMatch(aName::equals)) {
return true;
}
}
Expand Down Expand Up @@ -1198,8 +1200,7 @@ public void restore(String filePath) throws IOException {
* @return
*/
public boolean isAuthor(ItemCollection itemcol) {
@SuppressWarnings("unchecked")
List<String> writeAccessList = itemcol.getItemValue(WRITEACCESS);
List<?> writeAccessList = itemcol.getItemValue(WRITEACCESS);

/**
* 1.) org.imixs.ACCESSLEVEL.NOACCESS allways false - now write access!
Expand Down

0 comments on commit d7511dd

Please sign in to comment.