Skip to content

Commit

Permalink
attachment: Force move to resource in case of admin user
Browse files Browse the repository at this point in the history
This feature is required for import project by Site admin.
  • Loading branch information
doortts committed Jul 9, 2017
1 parent b1e78fb commit 92908df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/Attachment.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public static int moveOnlySelected(Resource from, Resource to, String[] selected
List<Attachment> attachments = Attachment.find.where().idIn(Arrays.asList(selectedFileIds)).findList();
for (Attachment attachment : attachments) {
if(attachment.containerId.equals(from.getId())
&& attachment.containerType == from.getType()){
&& attachment.containerType == from.getType() || UserApp.currentUser().isSiteManager()){
attachment.moveTo(to);
}
}
Expand Down

0 comments on commit 92908df

Please sign in to comment.