-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tools module functionality #2389
base: master
Are you sure you want to change the base?
Conversation
…n script) - distinguishing the Tools listing logic for administrators and the other users - replacing PermissionManager usage with UserRepository when appropriate to avoid exceptions when there is no security enabled
@Column(name = "description") | ||
private String description; | ||
@Column(name = "is_enabled") | ||
private Boolean isEnabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The property name should be renamed to 'enabled'
import org.ohdsi.webapi.tool.dto.ToolDTO; | ||
import org.springframework.stereotype.Controller; | ||
|
||
import javax.ws.rs.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports with * should be eliminated
import java.util.Optional; | ||
|
||
@Component | ||
public class ToolConvertor extends AbstractDaoService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need a separate class, to be moved to ToolServiceImpl
return tool; | ||
} | ||
|
||
private void setCreationDetails(Tool tool, Instant currentInstant) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need two separate methods
import java.text.SimpleDateFormat; | ||
import java.util.Date; | ||
|
||
public class DateUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of this class is unclear SimpleDateFormat usage should be sufficient
@@ -0,0 +1,18 @@ | |||
CREATE TABLE IF NOT EXISTS ${ohdsiSchema}.tool ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can combine all migration scripts into one if necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if you did this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, please mark these migrations attached to V2.15
@Component | ||
public class ToolPermissionSchema extends EntityPermissionSchema { | ||
private static Map<String, String> writePermissions = new HashMap<String, String>() {{ | ||
put("tool:%s:delete", "Delete Tool with id = %s"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid that the notation doesn't coincide with what is inserted by the migration scripts
Hello Everyone. Once the migration scripts are combined and the changes @alex-odysseus requests have been implemented, I can pull down the branches to check the functionality. |
…:put && tool:*:delete' permissions
…or renaming and imports notation
Addressing #2330