Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions onprc_ehr/resources/web/onprc_ehr/panel/LockAnimalsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,26 +142,11 @@ Ext4.define('ONPRC_EHR.panel.LockAnimalsPanel', {
item.setDisabled(locked); ///Disable all data entry fields on the screen
btn.setDisabled(locked); //Disable the "Unlock Entry" button for other users

//Let the sys Admins and Folder Admins unlock the screen
if (LABKEY.Security.currentUser.isSystemAdmin || LABKEY.Security.currentUser.isAdmin )
if (LABKEY.Security.currentUser.isSystemAdmin || LABKEY.Security.currentUser.isAdmin ) //Let the sys Admins and Folder Admins unlock the screen
{
btn.setDisabled(!locked);
}
else {
//Allow specific permission group to unlock birth screen
var groups = "Birth Lock Release Group";
LABKEY.Security.getGroupsForCurrentUser({
successCallback: function (results) {
for (var i = 0; i < results.groups.length; i++) {
if (groups == (results.groups[i].name)) {

btn.setDisabled(!locked);
return true;
}
}
}
});
}

}
//If the locked person is the loggedin person, Lock the screen. ie the Birth screen is always locked when you open it first time.
else if (this.locked_person == LABKEY.Security.currentUser.displayName) // || LABKEY.Security.currentUser.isAdmin )
Expand Down