1 | |
package org.kuali.student.lum.program.client.permissions; |
2 | |
|
3 | |
import org.kuali.student.common.ui.client.mvc.DataModel; |
4 | |
import org.kuali.student.lum.program.client.ProgramConstants; |
5 | |
import org.kuali.student.lum.program.client.ProgramStatus; |
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | 0 | public enum ModelPermissionType implements IModelPermission { |
11 | 0 | DRAFT_STATUS { |
12 | |
@Override |
13 | |
public boolean check(DataModel dataModel) { |
14 | 0 | ProgramStatus programStatus = ProgramStatus.of((String) dataModel.get(ProgramConstants.STATE)); |
15 | 0 | return programStatus != ProgramStatus.DRAFT; |
16 | |
} |
17 | |
}; |
18 | |
|
19 | |
public abstract boolean check(DataModel dataModel); |
20 | |
} |