Dear @jazz-y
I found problem in host.jsx file. When i remove this part related to a user validation, extension works perfectly, but it still bothers me what's wrong with this code. It works in all versions on PS on MAC and on previous versions of PS on WIN10, but something went wrong in PS 23.0.2 on WIN10. Do you have an idea regarding this issue?
////// DATE
var GivenDate = new Date('31/12/2022');
var CurrentDate = new Date();
////// USER
var users = ['emp1','emp2','emp3'];
function isMacOS() {
return ($.os.toLowerCase().indexOf('mac') >= 0);
}
function getUserName() {
return (isMacOS()) ? $.getenv("USER") : $.getenv("USERNAME");
}
var userName = getUserName();
var uservalidation;
for (var i = 0; i < users.length; i++) {
if (users[i] === userName) {
uservalidation = userName;
break;
}
}
if(GivenDate > CurrentDate){
if (uservalidation.value=true) {
// DO SOMETHING
}
else{
alert("Your are not licenced to use this extension!")
}
}
else{
alert("Your licence has expired!")
}
I solved this issue. Usernames on WIN10 are written with capital letters 😞 for example on MAC was employee1, and on WIN10 EMPLOYEE1
Sorry for interruption.