liquid_feedback_frontend
annotate env/util/is_profile_field_locked.lua @ 1091:20680a81c3e1
Fixed view for creating new initiatives in polling mode
| author | bsw | 
|---|---|
| date | Fri Oct 17 11:30:09 2014 +0200 (2014-10-17) | 
| parents | 58f48a8a202a | 
| children | 32cc544d5a5b | 
| rev | line source | 
|---|---|
| bsw@1071 | 1 function util.is_profile_field_locked(member, field_name) | 
| bsw@1071 | 2 if member.authority == "ldap" then | 
| bsw@1071 | 3 if config.ldap.member.locked_profile_fields and config.ldap.member.locked_profile_fields[field_name] | 
| bsw@1071 | 4 or field_name == "login" | 
| bsw@1071 | 5 or field_name == "password" | 
| bsw@1071 | 6 then | 
| bsw@1071 | 7 return true | 
| bsw@1071 | 8 end | 
| bsw@1071 | 9 end | 
| bsw@1071 | 10 | 
| bsw@1071 | 11 if config.locked_profile_fields[field_name] then | 
| bsw@1071 | 12 return true | 
| bsw@1071 | 13 end | 
| bsw@1071 | 14 | 
| bsw@1071 | 15 return false | 
| bsw@1071 | 16 end |