reset password
Author Message
raylongma1018
Posts: 81
Posted 19:12 Aug 05, 2015 |

Hi Dr.sun

So now I am studying how you handle same file name uploading on csns2 i found your file class is in csns.model.core but I really wish to see how you handle the same file name situation in controller. But there are too many controller in your csns2, can you give me any advise which controller should I look at on csns2? Also I found this same file name uploading handing seems not that easy,I am just curious will you put this in the midterm? , 

cysun
Posts: 2935
Posted 23:44 Aug 05, 2015 |

Check out the controllers that handle homework submissions.

raylongma1018
Posts: 81
Posted 21:26 Aug 06, 2015 |

Hi Dr,Sun

I checked the csns2 and see how you upload the files to servers and prevent same name conflicts

I found an annotation @PreAuthorize("authenticated and (#file.parent == null and #file.owner.id == principal.id or principal.faculty or #file.submission != null and #file.submission.assignment.section.isInstructor(principal) or #file.parent != null and #file.parent.owner.id == principal.id)")

I believe this is the trick to resolve the same file name issues, but the problem is I don't know how this annotation works

please help

cysun
Posts: 2935
Posted 07:48 Aug 07, 2015 |

That's not the trick. It's for security which will be covered next week.