reset password
Author Message
lmann2
Posts: 156
Posted 16:58 Mar 04, 2015 |

I was wondering why you use the @jsonIgnore annotation in CSNS? I understand that, "the annotated method is to be ignored by introspection-based serialization and deserialization functionality. That is, it should not be consider a "getter", "setter" or "creator".", but not why we want to apply that in our application.

cysun
Posts: 2935
Posted 17:06 Mar 04, 2015 |

You don't need to use that annotation. It's for some RESTful web service stuff. We'll discuss that next week.

lmann2
Posts: 156
Posted 17:29 Mar 04, 2015 |

<Note: This post was duplicated, i'm not sure why and csns lists the reply in the other thread and not this one>

Just one CSNS related question  in the jsp pages you use both hasRole('ROLE_ADMIN') and principal.instructor (you could have also used principal.sysadmin which would be equal to ROLE_ADMIN). 

Why not just principal.sysadmin?

cysun
Posts: 2935
Posted 17:30 Mar 04, 2015 |
lmann2 wrote:

<Note: This post was duplicated, i'm not sure why and csns lists the reply in the other thread and not this one>

Just one CSNS related question  in the jsp pages you use both hasRole('ROLE_ADMIN') and principal.instructor (you could have also used principal.sysadmin which would be equal to ROLE_ADMIN). 

Why not just principal.sysadmin?

Which page are you talking about?

lmann2
Posts: 156
Posted 17:41 Mar 04, 2015 |

menu.jsp

cysun
Posts: 2935
Posted 17:49 Mar 04, 2015 |

As you pointed out, hasRole('ROLE_ADMIN') and principal.sysadmin are equivalent. I don't remember why I chose to use hasRole() but it's likely a pretty random decision. Now that you mentioned it, it's probably better to use principal.sysadmin to be more clear and consistent with other conditions.