public Result < Void > extendUserRole ( AuthzTrans trans , UserRoleDAO . Data urData , boolean checkForExist ) { // Check if record still exists if ( checkForExist && q . userRoleDAO . read ( trans , urData ) . notOKorIsEmpty ( ) ) { return Result . err ( Status . ERR_UserRoleNotFound , "User Role does not exist" ) ; } if ( q . roleDAO . read ( trans , urData . ns , urData . rname ) . notOKorIsEmpty ( ) ) { return Result . err ( Status . ERR_RoleNotFound , "Role [%s.%s] does not exist" , urData . ns , urData . rname ) ; } // Special case for "Admin" roles. Issue brought forward with Prod // problem 9/26 urData . expires = trans . org ( ) . expiration ( null , Expiration . UserInRole ) . getTime ( ) ; // get // Full // time // starting // today return q . userRoleDAO . update ( trans , urData ) ; }
Extend User Role .